11name : image
22on :
33 pull_request :
4+ types : [opened, synchronize, reopened, labeled]
45 push :
56 branches :
67 - measure
@@ -11,13 +12,47 @@ concurrency:
1112 cancel-in-progress : true
1213
1314jobs :
15+ # build-setup:
16+ # name: Setup build metadata
17+ # runs-on: ubuntu-latest
18+
19+ # env:
20+ # FULL_CI: "${{
21+ # github.event_name != 'pull_request'
22+ # || contains(github.event.pull_request.labels.*.name, 'Trigger: Full-CI')
23+ # }}"
24+
25+ # steps:
26+ # - id: set-outputs
27+ # run: |
28+ # echo "full_ci=$FULL_CI" >> $GITHUB_OUTPUT
29+
30+ # if [[ "$FULL_CI" == "true" ]]; then
31+ # echo "Running full CI"
32+ # echo 'archs=["amd64", "arm64"]' >> $GITHUB_OUTPUT
33+ # else
34+ # echo "Skipping some CI steps"
35+ # echo 'archs=["amd64"]' >> $GITHUB_OUTPUT
36+ # fi
37+ # outputs:
38+ # archs: "${{ steps.set-outputs.outputs.archs }}"
39+ # full_ci: "${{ steps.set-outputs.outputs.full_ci }}"
40+
41+
1442 build-image :
1543 permissions :
1644 packages : write
1745 strategy :
1846 matrix :
19- arch : [amd64]
20- runs-on : ubuntu-20.04
47+ # arch: ${{ fromJson(needs.build-setup.outputs.archs) }}
48+ arch : ["amd64", "arm64"]
49+
50+ runs-on : |-
51+ ${{fromJson('{
52+ "amd64": "ubuntu-20.04",
53+ "arm64": "ubuntu-22.04-arm64-relay"
54+ }')[matrix.arch] }}
55+
2156 env :
2257 # IMG_CACHE: ghcr.io/measure-sh/symbolicator:${{ matrix.arch }}-latest
2358 IMG_VERSIONED : ghcr.io/measure-sh/symbolicator:${{ matrix.arch }}-${{ github.sha }}
2762 - uses : actions/checkout@v4
2863 with :
2964 submodules : recursive
30- - run : docker run --rm --privileged tonistiigi/binfmt --install arm64
31- if : matrix.arch == 'arm64'
65+
66+ - name : Docker Login
67+ run : docker login --username '${{ github.actor }}' --password '${{ secrets.GITHUB_TOKEN }}' ghcr.io
3268
3369 - name : build builder img
3470 run : |
6399 .
64100
65101 - name : push all images
102+ # if: "needs.build-setup.outputs.full_ci == 'true'"
66103 if : github.event_name != 'pull_request'
67104 run : |
68- set -euxo pipefail
69- docker login --username '${{ github.actor }}' --password '${{ secrets.GITHUB_TOKEN }}' ghcr.io
70105 docker push "$BUILDER_IMG_CACHE"
71106 docker push "$NIGHTLY_IMG_CACHE"
72107 docker push "$IMG_VERSIONED"
0 commit comments