Skip to content

Commit

Permalink
Only run workflows when necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
flagarde committed Sep 20, 2024
1 parent 7391862 commit aa8a094
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
---
name: CodeQL

permissions:
actions: read
contents: read
security-events: write

on:
push:
paths-ignore:
- "dependabot/**"
- '.github/workflows/**'
- '!.github/workflows/codeql-analysis.yml'
pull_request:
branches:
- "dependabot/**"
- '.github/workflows/**'
- '!.github/workflows/codeql-analysis.yml'
schedule:
- cron: '18 23 * * 1'

permissions:
actions: read
contents: read
security-events: write

jobs:
analyze:
name: Analyze
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/cpp-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ name: cpp-linter

on:
push:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/cpp-linter.yml'
pull_request:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/cpp-linter.yml'
workflow_dispatch:

jobs:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/dockcross.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ name: Dockcross

on:
push:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/dockcross.yml'
pull_request:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/dockcross.yml'
workflow_dispatch:

concurrency:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ name: docs

on:
push:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/docs.yml'
pull_request:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/docs.yml'
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ name: Linux

on:
push:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/linux.yml'
pull_request:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/linux.yml'
workflow_dispatch:

concurrency:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/macOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ name: macOS

on:
push:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/macOS.yml'
pull_request:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/macOS.yml'
workflow_dispatch:

concurrency:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ name: Windows

on:
push:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/windows.yml'
pull_request:
paths-ignore:
- '.github/workflows/**'
- '!.github/workflows/windows.yml'
workflow_dispatch:

concurrency:
Expand Down

0 comments on commit aa8a094

Please sign in to comment.