Skip to content

Commit

Permalink
docs: add basic example for CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
gotbadger committed Aug 25, 2023
1 parent 8ef223c commit 6db63d6
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion docs/guides/ci-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,30 @@ For more details and additional configuration, see our [guide to using GitLab](/

## CircleCI

To integrate with CircleCI using a Github repository and reviewdog for comments, you can use the following setup.
To integrate with CicleCI you can add the following job to your `.circleci/config.yml`

```yml
version: 2.1
jobs:
bearer:
machine:
image: ubuntu-2204:2023.07.2
environment:
# Set to default branch of your repo
DEFAULT_BRANCH: main
steps:
- checkout
- run: curl -sfL https://raw.githubusercontent.com/Bearer/bearer/main/contrib/install.sh | sh -s -- -b /tmp
- run: CURRENT_BRANCH=$CIRCLE_BRANCH SHA=$CIRCLE_SHA1 /tmp/bearer scan .
workflows:
test:
jobs:
- bearer
```

A more advanced example using a Github repository and reviewdog for PR comments:

```yml
version: 2.1
Expand Down

0 comments on commit 6db63d6

Please sign in to comment.