Skip to content

Commit

Permalink
Merge pull request #101 from phillmv/build-arm64
Browse files Browse the repository at this point in the history
Build images for arm64
  • Loading branch information
phillmv authored Jul 12, 2024
2 parents 2e59b63 + 7781a94 commit cd27cd7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/publish_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ jobs:
id-token: write
contents: write
packages: write
attestations: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# Uses the `docker/login-action` action to log in to the Container registry registry using the account and password that will publish the packages. Once published, the packages are scoped to the account defined here.
Expand Down Expand Up @@ -65,13 +70,14 @@ jobs:
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.annotations }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Attest image
uses: github-early-access/generate-build-provenance@main
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
subject-digest: ${{ steps.build-push-latest.outputs.digest }}
Expand All @@ -92,13 +98,14 @@ jobs:
context: .
push: true
target: development
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta2.outputs.tags }}
labels: ${{ steps.meta2.outputs.labels }}
annotations: ${{ steps.meta2.outputs.annotations }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Attest dev image
uses: github-early-access/generate-build-provenance@main
uses: actions/attest-build-provenance@v1
with:
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-development
subject-digest: ${{ steps.build-push-development.outputs.digest }}
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ FROM install-node as install-node-modules
## Contrary to the template, here we copy the app code *before* fetching the gems
## and running yarn install because our repo vendors these dependencies; if we copy
## the app code *after* installing deps we'll then overwrite these folders.
COPY --link package.json yarn.lock .
COPY --link node_modules ./node_modules
COPY package.json yarn.lock .
COPY node_modules ./node_modules

# Install node modules
RUN --mount=type=cache,id=bld-yarn-cache,target=/root/.yarn \
Expand All @@ -80,8 +80,8 @@ FROM install-node-modules as install-gems
## because we already have a `vendor` folder we copied above, when we copied over
## our application code.

COPY --link Gemfile Gemfile.lock .
COPY --link vendor ./vendor
COPY Gemfile Gemfile.lock .
COPY vendor ./vendor

RUN bundle config set app_config .bundle && \
bundle config set path vendor && \
Expand Down

0 comments on commit cd27cd7

Please sign in to comment.