Skip to content

Commit

Permalink
.github: add tags also for ghcr.io
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
  • Loading branch information
troglobit committed Aug 11, 2023
1 parent 028e92a commit 6136850
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ jobs:
run: |
VERSION=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')
if [ "$VERSION" = "master" ]; then
echo "tags=${{ github.repository }}:build-${GITHUB_RUN_NUMBER}" >> $GITHUB_OUTPUT
base="${{ github.repository }}:build-${GITHUB_RUN_NUMBER}"
ghcr="ghcr.io/$base"
echo "tags=$base,$ghcr" >> $GITHUB_OUTPUT
else
echo "tags=${{ github.repository }}:$VERSION,${{ github.repository }}:latest" >> $GITHUB_OUTPUT
echo "labels=org.opencontainers.image.version=$VERSION" >> $GITHUB_OUTPUT
base="${{ github.repository }}:$VERSION,${{ github.repository }}:latest"
base="ghcr.io/${{ github.repository }}:$VERSION,ghcr.io/${{ github.repository }}:latest"
echo "tags=$base,$ghcr" >> $GITHUB_OUTPUT
echo "labels=org.opencontainers.image.version=$VERSION" >> $GITHUB_OUTPUT
fi
echo "args=revision=${GITHUB_SHA}" >> $GITHUB_OUTPUT
- uses: docker/metadata-action@v4
Expand Down

0 comments on commit 6136850

Please sign in to comment.