Skip to content

WIP Libaaec 38 migrate from circle ci to GitHub actions to handle ci #15

WIP Libaaec 38 migrate from circle ci to GitHub actions to handle ci

WIP Libaaec 38 migrate from circle ci to GitHub actions to handle ci #15

name: Ensure Bundler-Audit Passes
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
bundler-audit:
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
# Step 3: Install Dependencies
- name: Install Dependencies
run: |
bundle install
# Step 4: Run Bundler-Audit and Save Output
- name: Run Bundler-Audit
id: bundler-audit
run: |
bundle exec bundler-audit check --update || true
bundle exec bundler-audit check --update > bundler-audit-output.txt || true
# Step 5: Analyze Bundler-Audit Output for Critical Issues
- name: Analyze Bundler-Audit Output
run: |
if grep -Eq '\b(Critical|High)\b' bundler-audit-output.txt; then
echo "High or Critical vulnerabilities detected!"
exit 1
else
echo "Only low or medium vulnerabilities found."
fi