From fcaa53cfe44d17a870ea4d9a6eb9eba94c91aba2 Mon Sep 17 00:00:00 2001 From: Kevin Dew Date: Thu, 27 Jul 2023 11:19:09 +0100 Subject: [PATCH] Use GOV.UK conventions for running GitHub Action workflows This updates the approach to running this workflow to reflect the approach in: https://github.com/alphagov/govuk-developer-docs/pull/3961 --- .github/workflows/ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b63fc2fc..385df1c1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,22 @@ -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: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + with: + ref: ${{ inputs.ref || github.ref }} - uses: ruby/setup-ruby@v1 with: bundler-cache: true