Docker publish : add meta action for auto tag management

This commit is contained in:
lconsuegra 2021-01-07 17:08:32 +01:00
parent 3e3e5145b9
commit 50ac9451c5
1 changed files with 7 additions and 3 deletions

View File

@ -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 }}