forked from JoeyMckenzie/Dappery
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👷 update semgrep workflow to use paths-filter for improved file chang…
…e detection
- Loading branch information
1 parent
8063bdc
commit c40ab31
Showing
1 changed file
with
22 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,7 @@ on: | |
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [master] | ||
paths-ignore: | ||
- "**/*.md" | ||
- "**/*.txt" | ||
- "**/.editorconfig" | ||
- "**/*.runsettings" | ||
- "**/typos.toml" | ||
- ".github/**" | ||
- "!.github/workflows/semgrep.yml" | ||
|
||
push: | ||
branches: | ||
- main | ||
|
@@ -40,5 +33,24 @@ jobs: | |
container: | ||
image: returntocorp/semgrep | ||
steps: | ||
- uses: actions/[email protected] | ||
- run: semgrep ci | ||
- name: 'Checkout Repository' | ||
uses: actions/[email protected] | ||
- name: "Check for changed files" | ||
uses: dorny/paths-filter@v3 | ||
id: filter | ||
with: | ||
predicate-quantifier: 'every' | ||
filters: | | ||
code: | ||
- "!**/*.md" | ||
- "!**/*.txt" | ||
- "!**/.editorconfig" | ||
- "!**/*.runsettings" | ||
- "!**/typos.toml" | ||
- "!.github/**" | ||
workflow: | ||
- ".github/workflows/semgrep.yml" | ||
- name: 'Run Semgrep' | ||
if: steps.filter.outputs.code == 'true' || steps.filter.outputs.workflow == 'true' | ||
run: semgrep ci |