Skip to content

Commit

Permalink
ci: add GitHub Actions workflow for Bearer PR checks
Browse files Browse the repository at this point in the history
- Add a GitHub Actions workflow for Bearer PR checks
- Configure the workflow to trigger on pull request events (opened, synchronize, reopened)
- Set permissions for contents (read) and pull-requests (write)
- Define a job to run on ubuntu-latest
- Include steps to checkout the repository, set up reviewdog, run Bearer report, and execute reviewdog with the report

Signed-off-by: appleboy <[email protected]>
  • Loading branch information
appleboy committed Dec 29, 2024
1 parent b20526d commit 5aa8c3c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/bearer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Bearer PR Check

on:
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: write

jobs:
rule_check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest

- name: Run Report
id: report
uses: bearer/bearer-action@v2
with:
format: rdjson
output: rd.json
diff: true

- name: Run reviewdog
if: always()
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cat rd.json | reviewdog -f=rdjson -reporter=github-pr-review

0 comments on commit 5aa8c3c

Please sign in to comment.