From 2200891d385edd19310e383d560140a932bfe834 Mon Sep 17 00:00:00 2001 From: Nicholas McDonnell <50747025+mcdonnnj@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:39:01 -0500 Subject: [PATCH] Use docker/build-push-action default behavior Instead of overriding the context and file we can allow the Action to fall back on its default behaviour of using the `git` context to pull the source needed to build the image. This also allows us to remove the actions/checkout Action from the `build` and `build-push-all` jobs. --- .github/workflows/build.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 581faae..8425738 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -255,8 +255,6 @@ jobs: uses: step-security/harden-runner@v2 with: egress-policy: audit - - name: Checkout - uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -278,8 +276,6 @@ jobs: with: cache-from: type=local,src=${{ env.BUILDX_CACHE_DIR }} cache-to: type=local,dest=${{ env.BUILDX_CACHE_DIR }} - context: . - file: ./Dockerfile labels: ${{ needs.prepare.outputs.labels }} outputs: type=docker,dest=dist/image.tar # Uncomment the following option if you are building an image for use @@ -399,8 +395,6 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io username: ${{ github.actor }} - - name: Checkout - uses: actions/checkout@v4 - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -420,8 +414,6 @@ jobs: with: cache-from: type=local,src=${{ env.BUILDX_CACHE_DIR }} cache-to: type=local,dest=${{ env.BUILDX_CACHE_DIR }} - context: . - file: ./Dockerfile labels: ${{ needs.prepare.outputs.labels }} platforms: | linux/amd64