From 273e80f1fe5c8716cc7b6f59c6b8961cc1f9ff0f Mon Sep 17 00:00:00 2001 From: Davide Pesavento Date: Wed, 20 Sep 2023 23:28:11 -0400 Subject: [PATCH] ci: update all actions to the latest version Change-Id: Ib799183ea5d613b784f275213b4b2f0f97b80cb8 --- .github/workflows/docker.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e091b6c..3d30f7f 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,15 +1,17 @@ -name: Create and publish a Docker image +name: Publish Docker image on: push: - branches: ['master'] + branches: + - master + workflow_dispatch: env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} jobs: - build-and-push-image: + publish: runs-on: ubuntu-latest permissions: contents: read @@ -17,25 +19,26 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Log in to the Container registry - uses: docker/login-action@v2 + - name: Login to ${{ env.REGISTRY }} + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker + - name: Extract metadata for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v5 with: context: . + pull: true push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}