Skip to content

Commit 5e23613

Browse files
authored
Merge pull request #68 from alphagov/separate-publish-workflow
Split out publish workflow from CI
2 parents 86cbf28 + 50b9299 commit 5e23613

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
name: CI
2+
13
on: [push, pull_request]
24

35
jobs:
@@ -10,7 +12,7 @@ jobs:
1012
dependency-review:
1113
name: Dependency Review scan
1214
uses: alphagov/govuk-infrastructure/.github/workflows/dependency-review.yml@main
13-
15+
1416
# This matrix job runs the test suite against multiple Ruby versions
1517
test_matrix:
1618
strategy:
@@ -34,12 +36,3 @@ jobs:
3436
runs-on: ubuntu-latest
3537
steps:
3638
- run: echo "All matrix tests have passed 🚀"
37-
38-
publish:
39-
needs: test
40-
if: ${{ github.ref == 'refs/heads/main' }}
41-
permissions:
42-
contents: write
43-
uses: alphagov/govuk-infrastructure/.github/workflows/publish-rubygem.yml@main
44-
secrets:
45-
GEM_HOST_API_KEY: ${{ secrets.ALPHAGOV_RUBYGEMS_API_KEY }}

.github/workflows/publish.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Publish
2+
3+
on:
4+
workflow_dispatch:
5+
workflow_run:
6+
workflows: [CI]
7+
types: [completed]
8+
branches: [main]
9+
10+
jobs:
11+
publish:
12+
if: ${{ github.ref == 'refs/heads/main' }}
13+
permissions:
14+
contents: write
15+
uses: alphagov/govuk-infrastructure/.github/workflows/publish-rubygem.yml@main
16+
secrets:
17+
GEM_HOST_API_KEY: ${{ secrets.ALPHAGOV_RUBYGEMS_API_KEY }}

0 commit comments

Comments
 (0)