Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add bearer workflow #141

Merged
merged 2 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/bearer.yaml
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
6 changes: 6 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ jobs:
needs: tests
uses: ./.github/workflows/codeql.yaml

bearer:
needs: tests
uses: ./.github/workflows/bearer.yaml
with:
diff: ${{ github.event_name == 'pull_request' && true || false }}

regression:
needs: tests
uses: ./.github/workflows/regression.yaml
Expand Down