WIP Libaaec 38 migrate from circle ci to GitHub actions to handle ci #21
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
name: Ensure Brakeman Passes | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
brakeman: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the code | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Step 2: Set up Ruby | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true # Enable gem caching | |
# Step 3: Install Dependencies | |
- name: Install Dependencies | |
run: | | |
bundle install | |
# Step 4: Run Brakeman, displaying and saving the output | |
- name: Run Brakeman (Human-readable) | |
run: bundle exec brakeman --no-exit-on-warn | |
- name: Save Brakeman Report | |
run: bundle exec brakeman --no-exit-on-warn -o brakeman-output.json | |
# Step 5: Upload the Brakeman Report | |
- name: Upload Brakeman Report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: brakeman-report | |
path: brakeman-output.json |