-
-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (66 loc) · 2.48 KB
/
image.yml
File metadata and controls
77 lines (66 loc) · 2.48 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
on:
pull_request:
branches:
- main
push:
branches:
- main
- release/**
jobs:
build-multiplatform:
name: build-${{ matrix.platform }}
if: |
github.repository_owner == 'getsentry' && (
github.event_name == 'pull_request' ||
(github.event_name == 'push' && (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || startsWith(github.ref, 'refs/heads/release/')))
)
permissions:
contents: read
packages: write # Needed to push to GHCR
strategy:
matrix:
include:
- os: ubuntu-24.04
platform: amd64
- os: ubuntu-24.04-arm
platform: arm64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Build and push to ghcr.io
if: ${{ github.actor != 'dependabot[bot]' && (github.event_name == 'push' || !github.event.pull_request.head.repo.fork) }}
uses: getsentry/action-build-and-push-images@b172ab61a5f7eabd58bd42ce231b517e79947c01
with:
image_name: launchpad
platforms: linux/${{ matrix.platform }}
dockerfile_path: "./Dockerfile"
tag_suffix: -${{ matrix.platform }}
ghcr: true
tag_nightly: true
tag_latest: true
create-manifest:
name: Create multi-platform manifest
needs: build-multiplatform
if: |
github.repository_owner == 'getsentry'
&& github.event_name == 'push'
&& (github.ref == format('refs/heads/{0}', github.event.repository.default_branch) || startsWith(github.ref, 'refs/heads/release/'))
permissions:
contents: read
packages: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Docker Login
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@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Create multiplatform manifests
run: |
docker buildx imagetools create \
--tag ghcr.io/getsentry/launchpad:${{ github.sha }} \
--tag ghcr.io/getsentry/launchpad:nightly \
ghcr.io/getsentry/launchpad:${{ github.sha }}-amd64 \
ghcr.io/getsentry/launchpad:${{ github.sha }}-arm64