Skip to content

Commit ea4af04

Browse files
authored
Merge pull request #495 from cgwalters/skip-ci
ci: Add control/skip-ci label
2 parents 1bafdba + 408c9d8 commit ea4af04

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.github/labeler.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ documentation:
44
- 'docs/*'
55
- README.md
66

7+
# Automatically bypass most CI for doc-only changes
8+
control/skip-ci:
9+
- changed-files:
10+
- any-glob-to-all-files:
11+
- 'docs/*'
12+
- README.md
13+
714
area/install:
815
- changed-files:
916
- any-glob-to-any-file: 'lib/src/install*'

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ concurrency:
1919

2020
jobs:
2121
tests:
22+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
2223
runs-on: ubuntu-latest
2324
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
2425
steps:
@@ -49,6 +50,7 @@ jobs:
4950
- name: Clippy (gate on correctness and suspicous)
5051
run: cargo clippy -- -D clippy::correctness -D clippy::suspicious
5152
build-fedora:
53+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
5254
runs-on: ubuntu-latest
5355
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
5456
steps:
@@ -67,6 +69,7 @@ jobs:
6769
name: bootc.tar.zst
6870
path: target/bootc.tar.zst
6971
build-c9s:
72+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
7073
runs-on: ubuntu-latest
7174
container: quay.io/centos/centos:stream9
7275
steps:
@@ -94,6 +97,7 @@ jobs:
9497
log-level: warn
9598
command: check bans sources licenses
9699
privtest:
100+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
97101
name: "Privileged testing"
98102
needs: build-fedora
99103
runs-on: ubuntu-latest
@@ -109,6 +113,7 @@ jobs:
109113
- name: Integration tests
110114
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
111115
container-tests:
116+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
112117
name: "Container testing"
113118
needs: build-fedora
114119
runs-on: ubuntu-latest
@@ -123,6 +128,7 @@ jobs:
123128
- name: Integration tests
124129
run: bootc internal-tests run-container-integration
125130
privtest-alongside:
131+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
126132
name: "Test install-alongside"
127133
needs: [build-c9s]
128134
runs-on: ubuntu-latest
@@ -153,6 +159,7 @@ jobs:
153159
${image} bootc install to-existing-root
154160
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
155161
install-to-existing-root:
162+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
156163
name: "Test install-to-existing-root"
157164
needs: [build-c9s]
158165
runs-on: ubuntu-latest
@@ -173,6 +180,7 @@ jobs:
173180
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 \
174181
${image} bootc install to-existing-root
175182
install-to-loopback:
183+
if: ${{ !contains(github.event.pull_request.labels.*.name, 'control/skip-ci') }}
176184
name: "Test install to-disk --via-loopback"
177185
needs: [build-c9s]
178186
runs-on: ubuntu-latest

.github/workflows/integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

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

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

0 commit comments

Comments
 (0)