Skip to content

Commit acf684a

Browse files
committed
ci: add GitHub Actions workflow for Bearer PR checks
- Add a GitHub Actions workflow for Bearer PR checks - Set up permissions for read access to contents and write access to pull requests - Include steps to checkout the repository, set up reviewdog, run Bearer report, and execute reviewdog with the report output Signed-off-by: appleboy <[email protected]>
1 parent 8d9925b commit acf684a

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/bearer.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Bearer PR Check
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
7+
permissions:
8+
contents: read
9+
pull-requests: write
10+
11+
jobs:
12+
rule_check:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- uses: reviewdog/action-setup@v1
19+
with:
20+
reviewdog_version: latest
21+
22+
- name: Run Report
23+
id: report
24+
uses: bearer/bearer-action@v2
25+
with:
26+
format: rdjson
27+
output: rd.json
28+
diff: true
29+
30+
- name: Run reviewdog
31+
if: always()
32+
env:
33+
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
run: |
35+
cat rd.json | reviewdog -f=rdjson -reporter=github-pr-review

0 commit comments

Comments
 (0)