From bbecb81d4f49f80412c52e9aaa589b2d9187f6bb Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Mon, 9 May 2022 09:16:52 +0200 Subject: [PATCH] ci: add `ci/skip/multi-arch-build` label If the `ci/skip/multi-arch-build` label is set on a PR, the GitHub Workflow only builds for the local architecture. This makes it possible to merge PRs faster. Signed-off-by: Niels de Vos --- .github/workflows/build-multi-stage.yaml | 6 ++++++ docs/development-guide.md | 1 + 2 files changed, 7 insertions(+) diff --git a/.github/workflows/build-multi-stage.yaml b/.github/workflows/build-multi-stage.yaml index 9b312a296..9dd416e3c 100644 --- a/.github/workflows/build-multi-stage.yaml +++ b/.github/workflows/build-multi-stage.yaml @@ -15,7 +15,13 @@ jobs: steps: - uses: actions/checkout@v3 - name: multi-arch-build + # yamllint disable-line rule:line-length + if: ${{ ! contains(github.event.pull_request.labels.*.name, 'ci/skip/multi-arch-build') }} # 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 + # yamllint disable-line rule:line-length + if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/skip/multi-arch-build') }} + run: make containerized-build diff --git a/docs/development-guide.md b/docs/development-guide.md index 05dc6b1df..6a90e16f9 100644 --- a/docs/development-guide.md +++ b/docs/development-guide.md @@ -251,6 +251,7 @@ A few labels interact with automation around the pull requests: * ready-to-merge: This PR is ready to be merged and it doesn't need second review * DNM: DO NOT MERGE (Mergify will not merge this PR) * ci/skip/e2e: skip running e2e CI jobs +* ci/skip/multi-arch-build: skip building container images for different architectures **Review Process:** Once your PR has been submitted for review the following criteria will