-
-
Notifications
You must be signed in to change notification settings - Fork 4
106 lines (97 loc) · 3.73 KB
/
image.yml
File metadata and controls
106 lines (97 loc) · 3.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
on:
pull_request:
push:
branches:
- main
- release/**
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-24.04
platform: amd64
- os: ubuntu-24.04-arm
platform: arm64
name: build-${{ matrix.platform }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build and push taskbroker image
uses: getsentry/action-build-and-push-images@a53f146fc1ea3cb404f2dcf7378f5b60dd98d3ca
with:
image_name: 'taskbroker'
platforms: linux/${{ matrix.platform }}
dockerfile_path: './Dockerfile'
build_args: TASKBROKER_GIT_REVISION=${{ github.sha }}
ghcr: true
tag_suffix: -${{ matrix.platform }}
publish_on_pr: true
google_ar: false
tag_nightly: false
tag_latest: false
assemble-taskbroker-image:
runs-on: ubuntu-latest
needs: [build]
if: ${{ (github.ref_name == 'main' || startsWith(github.ref_name, 'releases/')) && github.event_name != 'pull_request' }}
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- run: docker login --username '${{ github.actor }}' --password-stdin ghcr.io <<< "$GHCR_TOKEN"
env:
GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2 # v3.10.0
- name: Create multiplatform manifests
run: |
docker buildx imagetools create \
--tag ghcr.io/getsentry/taskbroker:${{ github.event.pull_request.head.sha || github.sha }} \
--tag ghcr.io/getsentry/taskbroker:nightly \
ghcr.io/getsentry/taskbroker:${{ github.event.pull_request.head.sha || github.sha }}-amd64 \
ghcr.io/getsentry/taskbroker:${{ github.event.pull_request.head.sha || github.sha }}-arm64
build-production:
runs-on: ubuntu-24.04
if: github.ref_name == github.event.repository.default_branch
name: Build and push production images to ${{ matrix.registry }} registry
strategy:
matrix:
include:
- registry: single-region
image: us-central1-docker.pkg.dev/sentryio/taskbroker/image
- registry: multi-region
image: us-docker.pkg.dev/sentryio/taskbroker-mr/image
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build and push taskbroker image
uses: getsentry/action-build-and-push-images@a53f146fc1ea3cb404f2dcf7378f5b60dd98d3ca
with:
image_name: 'taskbroker'
platforms: linux/amd64
dockerfile_path: './Dockerfile'
build_args: TASKBROKER_GIT_REVISION=${{ github.sha }}
ghcr: false
google_ar: true
tag_nightly: false
tag_latest: true
google_ar_image_name: ${{ matrix.image }}
google_workload_identity_provider: projects/868781662168/locations/global/workloadIdentityPools/prod-github/providers/github-oidc-pool
google_service_account: gha-gcr-push@sac-prod-sa.iam.gserviceaccount.com
self-hosted-end-to-end:
needs: [assemble-taskbroker-image]
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Run Sentry self-hosted e2e CI
uses: getsentry/self-hosted@master
with:
project_name: taskbroker
image_url: ghcr.io/getsentry/taskbroker:${{ github.sha }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}