.github/workflows/ci.yml in govuk_schemas-4.5.0 vs .github/workflows/ci.yml in govuk_schemas-4.6.0
- old
+ new
@@ -1,23 +1,35 @@
-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:
# This matrix job runs the test suite against multiple Ruby versions
test_matrix:
strategy:
fail-fast: false
matrix:
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
- ruby: [ 2.7, '3.0', 3.1 ]
+ ruby: ['3.0', 3.1, 3.2]
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
+ with:
+ ref: ${{ inputs.ref || github.ref }}
- name: Clone content-schemas
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
with:
repository: alphagov/publishing-api
- ref: deployed-to-production
+ ref: main
path: tmp/publishing-api
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
@@ -37,8 +49,8 @@
publish:
needs: test
if: ${{ github.ref == 'refs/heads/main' }}
permissions:
contents: write
- uses: alphagov/govuk-infrastructure/.github/workflows/publish-rubygem.yaml@main
+ uses: alphagov/govuk-infrastructure/.github/workflows/publish-rubygem.yml@main
secrets:
GEM_HOST_API_KEY: ${{ secrets.ALPHAGOV_RUBYGEMS_API_KEY }}