Skip to content

Commit

Permalink
Use full GOV.UK release and CI workflows
Browse files Browse the repository at this point in the history
Turns out the release workflow expects a PR-based workflow with no way
of overriding, so let's just do this despite the simple nature of this
app.
  • Loading branch information
csutter committed Nov 20, 2023
1 parent 5570b8d commit 063cee8
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI

on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
ref:
description: 'The branch, tag or SHA to checkout'
default: main
type: string

jobs:
lint-ruby:
name: Lint Ruby
uses: alphagov/govuk-infrastructure/.github/workflows/rubocop.yml@main

security-analysis:
name: Security Analysis
uses: alphagov/govuk-infrastructure/.github/workflows/brakeman.yml@main
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ name: Release

on:
workflow_dispatch:
push:
branches:
- main
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]

jobs:
release:
if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success'
name: Release
uses: alphagov/govuk-infrastructure/.github/workflows/release.yml@main
secrets:
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ gem "sassc-rails"
gem "sprockets-rails"

group :development, :test do
gem "brakeman", require: false
gem "debug", platforms: %i[mri windows]
gem "rubocop-govuk"
end
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ GEM
base64 (0.2.0)
bigdecimal (3.1.4)
bindex (0.8.1)
brakeman (6.0.1)
builder (3.2.4)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
Expand Down Expand Up @@ -522,6 +523,7 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
brakeman
debug
gds-api-adapters
govuk_app_config
Expand Down

0 comments on commit 063cee8

Please sign in to comment.