Skip to content

Commit

Permalink
Follow dev doc guidance on when GitHub Actions should run
Browse files Browse the repository at this point in the history
This utilises the guidance introduced in: alphagov/govuk-developer-docs#3961
  • Loading branch information
kevindew committed Apr 24, 2024
1 parent 84da55d commit 882a7dd
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
ref:
description: 'The branch, tag or SHA to checkout'
default: main
type: string

jobs:
snyk-security:
Expand All @@ -11,7 +21,7 @@ jobs:
contents: read
security-events: write
actions: read

codeql-sast:
name: CodeQL SAST scan
uses: alphagov/govuk-infrastructure/.github/workflows/codeql-analysis.yml@main
Expand All @@ -21,7 +31,7 @@ jobs:
dependency-review:
name: Dependency Review scan
uses: alphagov/govuk-infrastructure/.github/workflows/dependency-review.yml@main

# This matrix job runs the test suite against multiple Ruby and Rails versions
test_matrix:
strategy:
Expand All @@ -36,6 +46,8 @@ jobs:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
Expand Down

0 comments on commit 882a7dd

Please sign in to comment.