Skip to content

Commit f616651

Browse files
committed
used the image name from earlier jobs
1 parent 533dcad commit f616651

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/push-docker-image.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ jobs:
3333
# Build Docker Image
3434
- name: Build Docker Image
3535
run: |
36-
docker build -t ghcr.io/${{ env.IMAGE_NAME }}:${{ github.sha }} .
36+
docker build -t ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }} .
37+
docker tag ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }} ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest
38+
3739

3840

3941
- name: Wait for Docker container to be ready
@@ -45,5 +47,5 @@ jobs:
4547
# Push the Docker image to the registry
4648
- name: Push Docker Image to GHCR
4749
run: |
48-
docker push ghcr.io/${{ env.IMAGE_NAME }}
49-
50+
docker push ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.tags }}
51+
docker push ghcr.io/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:latest

0 commit comments

Comments
 (0)