docker release: Add needed steps for build-push-action@v2

This commit is contained in:
lconsuegra 2021-01-08 08:59:12 +01:00
parent b6f252d6d1
commit 7aa2ee18ed
1 changed files with 21 additions and 6 deletions

View File

@ -10,20 +10,35 @@ jobs:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Check out the repo
-
name: Check out the repo
uses: actions/checkout@v2
- name: Docker meta
-
name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: camptocamp/cups_exporter
images: ghcr.io/camptocamp/cups_exporter
tag-semver: |
{{version}}
- name: Push to GitHub Packages
uses: docker/build-push-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.PAT }}
registry: ghcr.io
-
name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
-
name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}