Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
40 changes: 24 additions & 16 deletions .github/workflows/image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ jobs:
matrix:
os: [ubuntu-24.04, ubuntu-24.04-arm]
service: [gateway, publish]
target: [prod, dev]
include:
- os: ubuntu-24.04
platform: amd64
- os: ubuntu-24.04-arm
platform: arm64
name: build-${{ matrix.service }}-${{ matrix.platform }}
name: build-${{ matrix.service }}-${{ matrix.target }}-${{ matrix.platform }}
permissions:
contents: read
packages: write
Expand All @@ -31,14 +32,18 @@ jobs:
platforms: linux/${{ matrix.platform }}
dockerfile_path: "./Dockerfile"
build_args: SERVICE_NAME=${{ matrix.service }}
build_target: ${{ matrix.target }}
ghcr: true
tag_suffix: -${{ matrix.platform }}
tag_suffix: -${{ matrix.platform }}${{ matrix.target == 'prod' && '' || '-dev' }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add publish_on_pr: true to test to see if this works before merging

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, should we update devservices to use the dev version?

google_ar: false
tag_nightly: false
tag_latest: false

assemble:
runs-on: ubuntu-latest
strategy:
matrix:
service: [gateway, publish]
needs: [build]
if: ${{ (github.ref_name == 'main' || startsWith(github.ref_name, 'releases/')) && github.event_name != 'pull_request' }}
permissions:
Expand All @@ -54,20 +59,23 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0

- name: Create multiplatform multiplatform manifest for conduit
- name: Create multiplatform manifests for conduit (${{ matrix.service }})
run: |
# prod manifests
docker buildx imagetools create \
--tag ghcr.io/getsentry/conduit-gateway:${{ github.event.pull_request.head.sha || github.sha }} \
--tag ghcr.io/getsentry/conduit-gateway:nightly \
--tag ghcr.io/getsentry/conduit-gateway:latest \
ghcr.io/getsentry/conduit-gateway:${{ github.event.pull_request.head.sha || github.sha }}-amd64 \
ghcr.io/getsentry/conduit-gateway:${{ github.event.pull_request.head.sha || github.sha }}-arm64

- name: Create multiplatform multiplatform manifest for publish
run: |
--tag ghcr.io/getsentry/conduit-${{ matrix.service }}:${{ github.event.pull_request.head.sha || github.sha }} \
--tag ghcr.io/getsentry/conduit-${{ matrix.service }}:${{ github.event.pull_request.head.sha || github.sha }}-amd64 \
--tag ghcr.io/getsentry/conduit-${{ matrix.service }}:${{ github.event.pull_request.head.sha || github.sha }}-arm64 \
--tag ghcr.io/getsentry/conduit-${{ matrix.service }}:nightly \
--tag ghcr.io/getsentry/conduit-${{ matrix.service }}:latest \
ghcr.io/getsentry/conduit-${{ matrix.service }}:${{ github.event.pull_request.head.sha || github.sha }}-amd64 \
ghcr.io/getsentry/conduit-${{ matrix.service }}:${{ github.event.pull_request.head.sha || github.sha }}-arm64

# Dev manifests
docker buildx imagetools create \
--tag ghcr.io/getsentry/conduit-publish:${{ github.event.pull_request.head.sha || github.sha }} \
--tag ghcr.io/getsentry/conduit-publish:nightly \
--tag ghcr.io/getsentry/conduit-publish:latest \
ghcr.io/getsentry/conduit-publish:${{ github.event.pull_request.head.sha || github.sha }}-amd64 \
ghcr.io/getsentry/conduit-publish:${{ github.event.pull_request.head.sha || github.sha }}-arm64
--tag ghcr.io/getsentry/conduit-${{ matrix.service }}:${{ github.event.pull_request.head.sha || github.sha }}-dev \
--tag ghcr.io/getsentry/conduit-${{ matrix.service }}:${{ github.event.pull_request.head.sha || github.sha }}-amd64-dev \
--tag ghcr.io/getsentry/conduit-${{ matrix.service }}:${{ github.event.pull_request.head.sha || github.sha }}-arm64-dev \
--tag ghcr.io/getsentry/conduit-${{ matrix.service }}:dev \
ghcr.io/getsentry/conduit-${{ matrix.service }}:${{ github.event.pull_request.head.sha || github.sha }}-amd64-dev \
ghcr.io/getsentry/conduit-${{ matrix.service }}:${{ github.event.pull_request.head.sha || github.sha }}-arm64-dev
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ EXPOSE 8080
CMD ["/app/service"]

# Runtime image
FROM gcr.io/distroless/cc-debian12:nonroot AS runtime
FROM gcr.io/distroless/cc-debian12:nonroot AS prod

ARG SERVICE_NAME

Expand Down