version tag on docker hub

This commit is contained in:
sakkiii 2021-09-06 10:32:37 +05:30 committed by GitHub
parent 0ff4b30d71
commit aaca54722a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,3 +28,25 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: awesometechnologies/synapse-admin:latest
- name: Calculate docker image tag
id: set-tag
run: |
case "${GITHUB_REF}" in
refs/heads/master|refs/heads/main)
tag=latest
;;
refs/tags/*)
tag=${GITHUB_REF#refs/tags/}
;;
*)
tag=${GITHUB_SHA}
;;
esac
echo "::set-output name=tag::$tag"
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: "awesometechnologies/synapse-admin:${{ steps.set-tag.outputs.tag }}"
platforms: linux/amd64,linux/arm64