use metadata-action to handle image tag names

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2021-09-12 23:27:06 +01:00
parent 55a682a94c
commit 944bc8eb79
No known key found for this signature in database
GPG Key ID: 872950F3ECF2B173
1 changed files with 9 additions and 2 deletions

View File

@ -33,6 +33,13 @@ jobs:
name: Get the tag name
run: |
echo "TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
-
name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: pihole/pihole
github-token: ${{ secrets.GITHUB_TOKEN }}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
@ -55,5 +62,5 @@ jobs:
PIHOLE_TAG=${{ env.TAG }}
PIHOLE_VERSION=${{ env.TAG }}
push: true
tags: |
pihole/pihole:${{ env.TAG }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}