Skip to content

Commit e945c28

Browse files
committed
Add github sha tag to image
1 parent e03b7cc commit e945c28

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/ci.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,14 @@ jobs:
9191
- name: Tag Docker image
9292
run: |
9393
if [ "${{ github.event_name }}" == "push" ] && [[ "${{ github.ref }}" == refs/tags/v* ]]; then
94-
TAG="${{ github.ref_name }}"
94+
TAG="${{ github.ref_name#refs/tags/ }}"
9595
else
9696
TAG="${{ github.sha }}"
9797
fi
98+
echo "Using tag: $TAG"
9899
docker tag ghcr.io/${{ github.repository }}/action:latest ghcr.io/${{ github.repository }}/action:$TAG
100+
docker push ghcr.io/${{ github.repository }}/action:latest
101+
docker push ghcr.io/${{ github.repository }}/action:$TAG
99102
100103
# Push Docker image to GitHub Container Registry
101104
- name: Push Docker image

0 commit comments

Comments
 (0)