From 5aba9c5402ac7b08b0b0cd94bd9cce60caba7476 Mon Sep 17 00:00:00 2001 From: Hang Yan Date: Fri, 7 Jun 2024 18:18:54 -0400 Subject: [PATCH] [CI] Prevented Running the CI If Only the Documentation Is Updated Added a `path-ignore` filter to the GitHub Actions triggers (including `push` and `pull_request`) to filter out any push or pull request that only includes docs updates. The "Test" and "Containers" workflows will be skipped if a push or a PR only contains changes to the documentation, such as the developer guide and README, so that we can save CI resources for other uses. --- .github/workflows/containers.yml | 10 ++++++++++ .github/workflows/test.yml | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 51266d970ce..0f75f6a86ac 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -7,7 +7,17 @@ on: push: branches: - master + paths-ignore: # Prevents from running if only docs are updated + - 'doc/**' + - '**/*README*' + - '**.md' + - '**.rst' pull_request: + paths-ignore: # Prevents from running if only docs are updated + - 'doc/**' + - '**/*README*' + - '**.md' + - '**.rst' workflow_dispatch: schedule: - cron: '0 0 * * 0' # weekly diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ad92c52c8fe..1dfa96c1108 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,17 @@ on: push: branches: - master + paths-ignore: # Prevents from running if only docs are updated + - 'doc/**' + - '**/*README*' + - '**.md' + - '**.rst' pull_request: + paths-ignore: # Prevents from running if only docs are updated + - 'doc/**' + - '**/*README*' + - '**.md' + - '**.rst' workflow_dispatch: schedule: - cron: '0 0 * * *' # daily