Skip to content

Commit

Permalink
Use docker/build-push-action default behavior
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mcdonnnj committed Feb 19, 2025
1 parent 0a2e987 commit 2200891
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2200891

Please sign in to comment.