From bac54f71c17a6830f3c193720b4188d278e4d661 Mon Sep 17 00:00:00 2001 From: Yuta Matsumura Date: Sun, 4 Aug 2024 15:42:06 +0900 Subject: [PATCH] Update docker-publish-to-ghcr-express.yml --- .../docker-publish-to-ghcr-express.yml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker-publish-to-ghcr-express.yml b/.github/workflows/docker-publish-to-ghcr-express.yml index 6f0a2fe..be6a25a 100644 --- a/.github/workflows/docker-publish-to-ghcr-express.yml +++ b/.github/workflows/docker-publish-to-ghcr-express.yml @@ -10,34 +10,30 @@ env: jobs: build-and-push-express-image: - runs-on: ubuntu-latest - defaults: run: working-directory: ${{ env.WORKING_DIRECTORY }} - permissions: contents: read packages: write id-token: write - steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install cosign if: github.event_name != 'pull_request' - uses: sigstore/cosign-installer@1e95c1de343b5b0c23352d6417ee3e48d5bcd422 + uses: sigstore/cosign-installer@v3.5.0 with: - cosign-release: 'v1.4.0' + cosign-release: 'v2.2.4' - name: Setup Docker buildx - uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf + uses: docker/setup-buildx-action@v3 - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' - uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -45,15 +41,14 @@ jobs: - name: Extract Docker metadata id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image id: build-and-push - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@v6 with: - context: ${{ env.WORKING_DIRECTORY }} push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }}