Skip to content

Commit

Permalink
Ignore GitHub Actions for non-relevant files (#3121)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
idelpivnitskiy authored Nov 22, 2024
1 parent a57150a commit b63aff5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci-prb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/ci-prq.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down

0 comments on commit b63aff5

Please sign in to comment.