Skip to content

Commit

Permalink
Merge pull request #1567 from alphagov/ruby-workflow-bundler-token
Browse files Browse the repository at this point in the history
Extend Ruby workflows to allow setting of Github token
  • Loading branch information
jackbot authored Jan 14, 2025
2 parents 8b41d67 + c20905a commit 713aef5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/brakeman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Run Brakeman

on:
workflow_call:
secrets:
BUNDLER_GITHUB_TOKEN:
required: false
description: "Token used for Bundler to authenticate when installing gems from private Github repos"

jobs:
run-brakeman:
Expand All @@ -19,6 +23,8 @@ jobs:
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
env:
BUNDLE_GITHUB__COM: "x-access-token:${{ secrets.BUNDLER_GITHUB_TOKEN }}"

- name: Run Brakeman
run: |
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/erblint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Run Erb Lint

on:
workflow_call:
secrets:
BUNDLER_GITHUB_TOKEN:
required: false
description: "Token used for Bundler to authenticate when installing gems from private Github repos"

jobs:
run-erblint:
Expand All @@ -16,6 +20,8 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
env:
BUNDLE_GITHUB__COM: "x-access-token:${{ secrets.BUNDLER_GITHUB_TOKEN }}"

- name: Run ErbLint
run: bundle exec erblint --lint-all
6 changes: 6 additions & 0 deletions .github/workflows/jasmine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
required: false
default: false
type: boolean
secrets:
BUNDLER_GITHUB_TOKEN:
required: false
description: "Token used for Bundler to authenticate when installing gems from private Github repos"

jobs:
run-jasmine:
Expand All @@ -24,6 +28,8 @@ jobs:
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
env:
BUNDLE_GITHUB__COM: "x-access-token:${{ secrets.BUNDLER_GITHUB_TOKEN }}"

- name: Setup Node
uses: alphagov/govuk-infrastructure/.github/actions/setup-node@main
Expand Down

0 comments on commit 713aef5

Please sign in to comment.