From 50ac9451c5a33a9b2c7f0df1f9e09e9be37513c9 Mon Sep 17 00:00:00 2001 From: lconsuegra Date: Thu, 7 Jan 2021 17:08:32 +0100 Subject: [PATCH] Docker publish : add meta action for auto tag management --- .github/workflows/docker-release.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 2f906ee..8964bdb 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -12,6 +12,12 @@ jobs: steps: - name: Check out the repo uses: actions/checkout@v2 + - name: Docker meta + id: docker_meta + uses: crazy-max/ghaction-docker-meta@v1 + with: + images: camptocamp/cups_exporter + tag-semver: {{version}} - name: Push to GitHub Packages uses: docker/build-push-action@v2 with: @@ -19,6 +25,4 @@ jobs: password: ${{ secrets.PAT }} registry: ghcr.io push: true - tags: | - camptocamp/cups_exporter:latest - camptocamp/cups_exporter:${{ github.event.release.tag_name }} + tags: ${{ steps.docker_meta.outputs.tags }}