Skip to content

Commit

Permalink
Merge pull request #495 from cgwalters/skip-ci
Browse files Browse the repository at this point in the history
ci: Add control/skip-ci label
  • Loading branch information
cgwalters committed Apr 26, 2024
2 parents 1bafdba + 408c9d8 commit ea4af04
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ documentation:
- 'docs/*'
- README.md

# Automatically bypass most CI for doc-only changes
control/skip-ci:
- changed-files:
- any-glob-to-all-files:
- 'docs/*'
- README.md

area/install:
- changed-files:
- any-glob-to-any-file: 'lib/src/install*'
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ concurrency:

jobs:
tests:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
runs-on: ubuntu-latest
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
steps:
Expand Down Expand Up @@ -49,6 +50,7 @@ jobs:
- name: Clippy (gate on correctness and suspicous)
run: cargo clippy -- -D clippy::correctness -D clippy::suspicious
build-fedora:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
runs-on: ubuntu-latest
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
steps:
Expand All @@ -67,6 +69,7 @@ jobs:
name: bootc.tar.zst
path: target/bootc.tar.zst
build-c9s:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
runs-on: ubuntu-latest
container: quay.io/centos/centos:stream9
steps:
Expand Down Expand Up @@ -94,6 +97,7 @@ jobs:
log-level: warn
command: check bans sources licenses
privtest:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
name: "Privileged testing"
needs: build-fedora
runs-on: ubuntu-latest
Expand All @@ -109,6 +113,7 @@ jobs:
- name: Integration tests
run: sudo podman run --rm -ti --privileged -v /run/systemd:/run/systemd -v /:/run/host -v /usr/bin/bootc:/usr/bin/bootc --pid=host quay.io/fedora/fedora-coreos:testing-devel bootc internal-tests run-privileged-integration
container-tests:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
name: "Container testing"
needs: build-fedora
runs-on: ubuntu-latest
Expand All @@ -123,6 +128,7 @@ jobs:
- name: Integration tests
run: bootc internal-tests run-container-integration
privtest-alongside:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
name: "Test install-alongside"
needs: [build-c9s]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -153,6 +159,7 @@ jobs:
${image} bootc install to-existing-root
sudo podman run --rm -ti --privileged -v /:/target -v ./usr/bin/bootc:/usr/bin/bootc --pid=host --security-opt label=disable ${image} bootc internal-tests verify-selinux /target/ostree --warn
install-to-existing-root:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
name: "Test install-to-existing-root"
needs: [build-c9s]
runs-on: ubuntu-latest
Expand All @@ -173,6 +180,7 @@ jobs:
sudo podman run --rm -ti --privileged --env RUST_LOG=debug -v /:/target -v /var/lib/containers:/var/lib/containers -v ./usr/bin/bootc:/usr/bin/bootc -v ${empty}:/usr/lib/bootc/install --pid=host --security-opt label=disable \
${image} bootc install to-existing-root
install-to-loopback:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
name: "Test install to-disk --via-loopback"
needs: [build-c9s]
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

rhel94-integration:
needs: pr-info
if: ${{ needs.pr-info.outputs.allowed_user == 'true' }}
if: ${{ needs.pr-info.outputs.allowed_user == 'true' && !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
continue-on-error: true
strategy:
matrix:
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:

cs9-dev-integration:
needs: pr-info
if: ${{ needs.pr-info.outputs.allowed_user == 'true' }}
if: ${{ needs.pr-info.outputs.allowed_user == 'true' && !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
continue-on-error: true
strategy:
matrix:
Expand Down

0 comments on commit ea4af04

Please sign in to comment.