-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: add bearer workflow Signed-off-by: Dwi Siswanto <[email protected]> * ci(tests): call bearer workflow Signed-off-by: Dwi Siswanto <[email protected]> --------- Signed-off-by: Dwi Siswanto <[email protected]>
- Loading branch information
1 parent
332dbc5
commit ec6340c
Showing
2 changed files
with
47 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: "Bearer" | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
diff: | ||
description: 'Enable differential scanning.' | ||
default: false | ||
required: false | ||
type: boolean | ||
|
||
jobs: | ||
bearer: | ||
name: Bearer Scan | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: reviewdog/action-setup@v1 | ||
with: | ||
reviewdog_version: latest | ||
|
||
- name: Bearer | ||
uses: bearer/bearer-action@v2 | ||
with: | ||
format: rdjson | ||
output: rd.json | ||
diff: ${{ inputs.diff }} | ||
severity: high,critical | ||
skip-path: examples/ | ||
exit-code: 1 | ||
|
||
- name: Run reviewdog | ||
if: inputs.diff == true | ||
env: | ||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: cat rd.json | reviewdog -f=rdjson -reporter=github-pr-review |
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