Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build images for arm64 #101

Merged
merged 5 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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