Skip to content

Commit

Permalink
feat(cicd): set docker tag if the current latest git commit is tagged.
Browse files Browse the repository at this point in the history
  • Loading branch information
panpuchkov committed Dec 24, 2023
1 parent ecfb679 commit ecac906
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,9 @@ jobs:
shell: bash
run: |
set -x
IMAGE_NAME_WITH_VERSION="${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:latest"
DOCKER_TAG=="$(git tag --contains)"
if [[ "${DOCKER_TAG} == "" ]]; then
DOCKER_TAG="latest"
fi
IMAGE_NAME_WITH_VERSION="${{ env.DOCKER_USERNAME }}/${{ env.IMAGE_NAME }}:${DOCKER_TAG}"
docker push "${IMAGE_NAME_WITH_VERSION}"

0 comments on commit ecac906

Please sign in to comment.