Skip to content

Commit

Permalink
Update publish-ghcr.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tnix100 authored Aug 13, 2024
1 parent 3578252 commit 98d8a78
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/publish-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ jobs:

- name: Login to GHCR.io
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Get short SHA
run: echo "SHORT_SHA=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_ENV

- name: Build and push images
run: |
IMAGE_NAME=ghcr.io/${{ github.repository }}
docker buildx build --push -t $IMAGE_NAME:${{ github.sha }} .
docker buildx build --push -t $IMAGE_NAME:${{ env.SHORT_SHA }} .

0 comments on commit 98d8a78

Please sign in to comment.