From b63aff53df015a3f372744c8f1426cdff70347d9 Mon Sep 17 00:00:00 2001 From: Idel Pivnitskiy Date: Fri, 22 Nov 2024 10:18:07 -0800 Subject: [PATCH] Ignore GitHub Actions for non-relevant files (#3121) Motivation: Currently, GitHub Actions workflows run on every change in the PR, even if it's known the file won't affect the output. Modifications: - For each workflow, ignore files that won't affect its result. Result: Less workflows to run for small PRs. --- .github/workflows/ci-prb.yml | 9 +++++++++ .github/workflows/ci-prq.yml | 8 ++++++++ .github/workflows/ci-snapshot.yml | 9 +++++++++ .github/workflows/codeql-analysis.yml | 14 ++++++++++++++ 4 files changed, 40 insertions(+) diff --git a/.github/workflows/ci-prb.yml b/.github/workflows/ci-prb.yml index 960f1e2829..c42caa019c 100644 --- a/.github/workflows/ci-prb.yml +++ b/.github/workflows/ci-prb.yml @@ -2,6 +2,15 @@ name: PR Builder on: pull_request: branches: [ main, '0.41', '0.42' ] + paths-ignore: + - 'docs/**' + - 'scripts/**' + - '.git.commit.template' + - '.gitignore' + - 'gradlew' + - 'gradlew.bat' + - '**.adoc' + - '**.txt' jobs: build: name: JDK ${{ matrix.java }} ${{ matrix.os }} diff --git a/.github/workflows/ci-prq.yml b/.github/workflows/ci-prq.yml index 5213a40b1b..f5ca234a4e 100644 --- a/.github/workflows/ci-prq.yml +++ b/.github/workflows/ci-prq.yml @@ -2,6 +2,14 @@ name: PR Quality on: pull_request: branches: [ main, '0.41', '0.42' ] + paths-ignore: + - 'scripts/**' + - '.git.commit.template' + - '.gitignore' + - 'gradlew' + - 'gradlew.bat' + - '*.adoc' + - '*.txt' jobs: quality: name: JDK ${{ matrix.java }} diff --git a/.github/workflows/ci-snapshot.yml b/.github/workflows/ci-snapshot.yml index 3b9d134bff..29835e811d 100644 --- a/.github/workflows/ci-snapshot.yml +++ b/.github/workflows/ci-snapshot.yml @@ -5,6 +5,15 @@ on: tags-ignore: - "[0-9]+.[0-9]+.[0-9]+" - "[0-9]+.[0-9]+.[0-9]+.[0-9]+" + paths-ignore: + - 'docs/**' + - 'scripts/**' + - '.git.commit.template' + - '.gitignore' + - 'gradlew' + - 'gradlew.bat' + - '**.adoc' + - '*.txt' jobs: build: name: Snapshot JDK ${{ matrix.java }} diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 10e6194587..bfc19ee860 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,9 +2,23 @@ name: CodeQL on: push: branches: [ main, '0.41', '0.42' ] + paths-ignore: + - 'docs/**' + - 'scripts/**' + - '.git.commit.template' + - '.gitignore' + - '**.adoc' + - '**.txt' pull_request: # The branches below must be a subset of the branches above branches: [ main, '0.41' ] + paths-ignore: + - 'docs/**' + - 'scripts/**' + - '.git.commit.template' + - '.gitignore' + - '**.adoc' + - '**.txt' schedule: - cron: '0 13 * * 1'