From ca0b6d3114c33c222ce12d80e1b0e2bb48428b4a Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Tue, 3 Feb 2026 18:55:47 -0700 Subject: [PATCH] ci: skip most CI checks if title contains citest skip [citest_skip] When we submit a PR for a CI update or docs, we do not want to start CI checking for ansible-lint, qemu, etc. When we are doing CI updates to 30 or more roles, this fires off a lot of unnecessary tests, which sometimes causes the linux-system-roles org in github to be throttled. When submitting a PR that can skip ci, use "[citest_skip]" in the PR title. Signed-off-by: Rich Megginson --- .github/workflows/ansible-centos.yml | 12 ++++++++++++ .github/workflows/ansible-debian.yml | 6 ++++++ .github/workflows/ansible-fedora.yml | 3 +++ .github/workflows/ansible-lint.yml | 3 +++ .github/workflows/ansible-managed-var-comment.yml | 3 +++ .github/workflows/ansible-test.yml | 3 +++ .github/workflows/ansible-ubuntu.yml | 6 ++++++ .github/workflows/codespell.yml | 2 ++ .github/workflows/markdownlint.yml | 3 +++ .github/workflows/qemu-kvm-integration-tests.yml | 3 +++ .github/workflows/shellcheck.yml | 3 +++ .github/workflows/test_converting_readme.yml | 3 +++ .github/workflows/woke.yml | 2 ++ 13 files changed, 52 insertions(+) diff --git a/.github/workflows/ansible-centos.yml b/.github/workflows/ansible-centos.yml index 58e21ea..fa9abaf 100644 --- a/.github/workflows/ansible-centos.yml +++ b/.github/workflows/ansible-centos.yml @@ -5,6 +5,9 @@ on: [push, pull_request] jobs: centos-7: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: - name: checkout PR @@ -20,6 +23,9 @@ jobs: targets: "tests/tests_*.yml" centos-8: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: - name: checkout PR @@ -33,6 +39,9 @@ jobs: targets: "tests/tests_*.yml" centos-9: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: - name: checkout PR @@ -46,6 +55,9 @@ jobs: targets: "tests/tests_*.yml" centos-10: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: - name: checkout PR diff --git a/.github/workflows/ansible-debian.yml b/.github/workflows/ansible-debian.yml index 9a8e69b..7eff986 100644 --- a/.github/workflows/ansible-debian.yml +++ b/.github/workflows/ansible-debian.yml @@ -6,6 +6,9 @@ on: # yamllint disable-line rule:truthy jobs: debian-bullseye: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: - name: checkout PR @@ -19,6 +22,9 @@ jobs: targets: "tests/tests_*.yml" debian-buster: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: - name: checkout PR diff --git a/.github/workflows/ansible-fedora.yml b/.github/workflows/ansible-fedora.yml index a6804aa..2fccb2d 100644 --- a/.github/workflows/ansible-fedora.yml +++ b/.github/workflows/ansible-fedora.yml @@ -5,6 +5,9 @@ on: [push, pull_request] jobs: build: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: # Important: This sets up your GITHUB_WORKSPACE environment variable diff --git a/.github/workflows/ansible-lint.yml b/.github/workflows/ansible-lint.yml index 46a1133..a82733f 100644 --- a/.github/workflows/ansible-lint.yml +++ b/.github/workflows/ansible-lint.yml @@ -18,6 +18,9 @@ permissions: contents: read jobs: ansible_lint: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: - name: Update pip, git diff --git a/.github/workflows/ansible-managed-var-comment.yml b/.github/workflows/ansible-managed-var-comment.yml index b8d1a54..eec5b48 100644 --- a/.github/workflows/ansible-managed-var-comment.yml +++ b/.github/workflows/ansible-managed-var-comment.yml @@ -15,6 +15,9 @@ permissions: contents: read jobs: ansible_managed_var_comment: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: - name: Update pip, git diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 111b44f..e4e25cc 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -18,6 +18,9 @@ permissions: contents: read jobs: ansible_test: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: - name: Update pip, git diff --git a/.github/workflows/ansible-ubuntu.yml b/.github/workflows/ansible-ubuntu.yml index 8f9eb2a..7a69dad 100644 --- a/.github/workflows/ansible-ubuntu.yml +++ b/.github/workflows/ansible-ubuntu.yml @@ -6,6 +6,9 @@ on: # yamllint disable-line rule:truthy jobs: ubuntu-latest: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: - name: checkout PR @@ -19,6 +22,9 @@ jobs: targets: "tests/tests_*.yml" ubuntu-20: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: - name: checkout PR diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 0fbee37..764bd71 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -7,6 +7,8 @@ permissions: contents: read jobs: codespell: + if: | + !(github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) name: Check for spelling errors runs-on: ubuntu-latest steps: diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index db6b4bb..9f0266b 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -16,6 +16,9 @@ permissions: contents: read jobs: markdownlint: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: - name: Update pip, git diff --git a/.github/workflows/qemu-kvm-integration-tests.yml b/.github/workflows/qemu-kvm-integration-tests.yml index 55801c9..82e7e1e 100644 --- a/.github/workflows/qemu-kvm-integration-tests.yml +++ b/.github/workflows/qemu-kvm-integration-tests.yml @@ -18,6 +18,9 @@ permissions: statuses: write jobs: scenario: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index dcb0827..baea60c 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -18,6 +18,9 @@ permissions: contents: read jobs: shellcheck: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest steps: - name: Update git diff --git a/.github/workflows/test_converting_readme.yml b/.github/workflows/test_converting_readme.yml index 91035b3..1e74557 100644 --- a/.github/workflows/test_converting_readme.yml +++ b/.github/workflows/test_converting_readme.yml @@ -15,6 +15,9 @@ permissions: contents: read jobs: test_converting_readme: + if: | + !((github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) || + (github.event_name == 'push' && contains(github.event.head_commit.message, '[citest_skip]'))) runs-on: ubuntu-latest permissions: contents: write diff --git a/.github/workflows/woke.yml b/.github/workflows/woke.yml index 0968d25..471e7b4 100644 --- a/.github/workflows/woke.yml +++ b/.github/workflows/woke.yml @@ -5,6 +5,8 @@ on: # yamllint disable-line rule:truthy - pull_request jobs: woke: + if: | + !(github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[citest_skip]')) name: Detect non-inclusive language runs-on: ubuntu-latest steps: