merge queue: embarking devel (3730bc7) and #5829 together #11670
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: multi-arch-build | |
| # yamllint disable-line rule:truthy | |
| on: | |
| pull_request: | |
| branches: | |
| - '*' | |
| permissions: | |
| contents: read | |
| # cancel the in-progress workflow when PR is refreshed. | |
| concurrency: | |
| # yamllint disable-line rule:truthy rule:line-length | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| codespell: | |
| name: multi-arch-build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: delay a minute to have labels added | |
| run: sleep 1m | |
| - name: detect single-arch-build | |
| # yamllint disable-line rule:line-length | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| id: detect-single-arch-build | |
| with: | |
| script: | | |
| const pr = await github.rest.pulls.get({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.payload.pull_request.number, | |
| }) | |
| for (const label of pr.data.labels) { | |
| if (label.name === 'ci/skip/multi-arch-build') { | |
| return true | |
| } | |
| } | |
| return false | |
| result-encoding: string | |
| # yamllint disable-line rule:line-length | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: multi-arch-build | |
| if: steps.detect-single-arch-build.outputs.result != 'true' | |
| # podman cannot pull images with both tag and digest | |
| # https://github.com/containers/buildah/issues/1407 | |
| # use docker to build images | |
| run: CONTAINER_CMD=docker ./scripts/build-multi-arch-image.sh | |
| - name: single-arch-build | |
| if: steps.detect-single-arch-build.outputs.result == 'true' | |
| run: make containerized-build |