From 7aa2ee18ed322f2ab90f2d46573751951256141e Mon Sep 17 00:00:00 2001 From: lconsuegra Date: Fri, 8 Jan 2021 08:59:12 +0100 Subject: [PATCH] docker release: Add needed steps for build-push-action@v2 --- .github/workflows/docker-release.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 5edda06..de9f416 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -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 }}