Skip to content

Commit 4c89e51

Browse files
committed
Add docker latest tag for tagged releases
1 parent 9703a12 commit 4c89e51

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
# Allows pushing to registry on localhost:5000
7676
driver-opts: network=host
7777

78-
- name: Setup push rights to Docker Hub
78+
- name: Setup push rights to Docker registry
7979
if: env.REGISTRY != 'localhost:5000'
8080
run: |
8181
docker login -u "${{ secrets.DOCKER_REGISTRY_USERNAME }}" -p "${{ secrets.DOCKER_REGISTRY_TOKEN }}" "${{ env.REGISTRY }}"
@@ -89,6 +89,10 @@ jobs:
8989
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
9090
TAGS="$TAGS,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:main"
9191
fi
92+
if [ "${{ startsWith(github.ref, 'refs/tags/') }}" = "true" ]; then
93+
TAGS="$TAGS,${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest"
94+
fi
95+
9296
echo "TAGS=$TAGS"
9397
echo "TAGS=$TAGS" >> $GITHUB_ENV
9498

0 commit comments

Comments
 (0)