-
Notifications
You must be signed in to change notification settings - Fork 15
104 lines (93 loc) · 3.47 KB
/
post-merge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: Post Merge
on:
push:
branches:
- master
paths-ignore:
- '.github/**'
permissions:
contents: read
concurrency: selfservice-post-merge
jobs:
tests:
uses: ./.github/workflows/run-tests.yml
publish-selfservice-consumer-contract-tests:
needs: tests
runs-on: ubuntu-latest
name: Publish and tag selfservice consumer pact
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
- name: Parse Node version
run: echo "NVMRC=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: parse-node-version
- name: Setup
uses: actions/setup-node@bea5baf987ba7aa777a8a0b4ace377a21c45c381
with:
node-version: "${{ steps.parse-node-version.outputs.NVMRC }}"
- name: Cache build directories
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: |
node_modules
govuk_modules
public
key: ${{ runner.os }}-build-id-${{ github.head_ref }}-${{ github.sha }}
- name: Cache pacts directory
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: pacts
key: ${{ runner.os }}-build-id-${{ github.head_ref }}-${{ github.sha }}-pacts
- name: Publish and tag selfservice consumer pact
env:
PACT_BROKER_URL: https://pact-broker.deploy.payments.service.gov.uk
PACT_CONSUMER_VERSION: ${{ github.sha }}
PACT_BROKER_USERNAME: ${{ secrets.pact_broker_username }}
PACT_BROKER_PASSWORD: ${{ secrets.pact_broker_password }}
PACT_CONSUMER_TAG: master
run: npm run publish-pacts
adminusers-provider-contract-tests:
needs: publish-selfservice-consumer-contract-tests
uses: alphagov/pay-adminusers/.github/workflows/_run-pact-provider-tests.yml@master
with:
consumer: selfservice
consumer_tag: master
secrets:
pact_broker_username: ${{ secrets.pact_broker_username }}
pact_broker_password: ${{ secrets.pact_broker_password }}
connector-provider-contract-tests:
needs: publish-selfservice-consumer-contract-tests
uses: alphagov/pay-connector/.github/workflows/_run-pact-provider-tests.yml@master
with:
consumer: selfservice
consumer_tag: master
secrets:
pact_broker_username: ${{ secrets.pact_broker_username }}
pact_broker_password: ${{ secrets.pact_broker_password }}
ledger-provider-contract-tests:
needs: publish-selfservice-consumer-contract-tests
uses: alphagov/pay-ledger/.github/workflows/_run-pact-provider-tests.yml@master
with:
consumer: selfservice
consumer_tag: master
secrets:
pact_broker_username: ${{ secrets.pact_broker_username }}
pact_broker_password: ${{ secrets.pact_broker_password }}
products-provider-contract-tests:
needs: publish-selfservice-consumer-contract-tests
uses: alphagov/pay-products/.github/workflows/_run-pact-provider-tests.yml@master
with:
consumer: selfservice
consumer_tag: master
secrets:
pact_broker_username: ${{ secrets.pact_broker_username }}
pact_broker_password: ${{ secrets.pact_broker_password }}
tag-release:
needs:
- adminusers-provider-contract-tests
- connector-provider-contract-tests
- ledger-provider-contract-tests
- products-provider-contract-tests
permissions:
contents: write
uses: alphagov/pay-ci/.github/workflows/_create-alpha-release-tag.yml@master