From f95c5e45bb12f6841185c7129939f9be4b820bdb Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Fri, 6 Sep 2024 14:50:55 +0530 Subject: [PATCH] Run GitHub Actions only if needed (#9664) Merge pull request 9664 --- .github/workflows/ci.yml | 4 ++++ .github/workflows/docs.yml | 2 ++ .github/workflows/spelling.yml | 6 ------ .github/workflows/third-party.yml | 6 ++---- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 138ab088..dfaa5ad2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,10 +5,14 @@ on: branches: - master - "*-stable" + paths-ignore: + - "docs/**" pull_request: branches: - master - "*-stable" + paths-ignore: + - "docs/**" jobs: ci: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d02f98fd..a2c94197 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -4,6 +4,8 @@ on: push: branches: - master + paths: + - "docs/**" env: RUBY_VERSION: 2.7 diff --git a/.github/workflows/spelling.yml b/.github/workflows/spelling.yml index 0a1fc3d0..6e49f187 100644 --- a/.github/workflows/spelling.yml +++ b/.github/workflows/spelling.yml @@ -34,12 +34,6 @@ name: Spell Check # For background, see: https://github.com/check-spelling/check-spelling/wiki/Feature:-Update-with-deploy-key on: - push: - branches: - - master - - "*-stable" - tags-ignore: - - "**" # Switch from `pull_request_target` event to reduce distraction from comments # regarding errors reported in unmodified files. pull_request: diff --git a/.github/workflows/third-party.yml b/.github/workflows/third-party.yml index f50864c9..9e5aa1c0 100644 --- a/.github/workflows/third-party.yml +++ b/.github/workflows/third-party.yml @@ -1,15 +1,13 @@ name: Third-Party Repository Profiling on: - push: - branches: - - master pull_request: branches: - master + jobs: build_n_profile: - if: "!contains(github.event.commits[0].message, '[ci skip]')" + if: "contains(github.event.commits[0].message, '[3P Profile]')" runs-on: 'ubuntu-latest' env: BUNDLE_GEMFILE: "sandbox/Gemfile"