Skip to content

Commit

Permalink
Add docker latest tag for tagged releases
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Aug 21, 2021
1 parent 9703a12 commit 4c89e51
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
# Allows pushing to registry on localhost:5000
driver-opts: network=host

- name: Setup push rights to Docker Hub
- name: Setup push rights to Docker registry
if: env.REGISTRY != 'localhost:5000'
run: |
docker login -u "${{ secrets.DOCKER_REGISTRY_USERNAME }}" -p "${{ secrets.DOCKER_REGISTRY_TOKEN }}" "${{ env.REGISTRY }}"
Expand All @@ -89,6 +89,10 @@ jobs:
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
TAGS="$TAGS,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main"
fi
if [ "${{ startsWith(github.ref, 'refs/tags/') }}" = "true" ]; then
TAGS="$TAGS,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
fi
echo "TAGS=$TAGS"
echo "TAGS=$TAGS" >> $GITHUB_ENV
Expand Down

0 comments on commit 4c89e51

Please sign in to comment.