generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 1.36 KB
/
pr-open.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
name: PR
on:
pull_request:
concurrency:
# PR open and close use the same group, allowing only one at a time
group: pr-${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true
jobs:
builds:
name: Builds
runs-on: ubuntu-latest
permissions:
packages: write
strategy:
matrix:
name: [backend, frontend]
include:
- name: backend
triggers: ('backend/')
- name: frontend
triggers: ('frontend/')
steps:
- uses: actions/checkout@v4
- uses: bcgov-nr/[email protected]
with:
package: ${{ matrix.name }}
tag: ${{ github.event.number }}
tag_fallback: latest
token: ${{ secrets.GITHUB_TOKEN }}
triggers: ${{ matrix.triggers }}
deploys:
name: Deploys (${{ github.event.number }})
needs: [builds]
secrets: inherit
uses: ./.github/workflows/.deploy.yml
results:
name: PR Results
if: always()
# Include all needs that could have failures!
needs: [builds, deploys]
runs-on: ubuntu-latest
steps:
- run: |
# View results
echo "needs.*.result: ${{ toJson(needs.*.result) }}"
- if: contains(needs.*.result, 'canceled|failure')
run: |
# Job failure found
echo "At least one job has failed"
exit 1