generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 1
66 lines (60 loc) · 1.69 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
57
58
59
60
61
62
63
64
65
66
name: PR
on:
pull_request:
concurrency:
group: ${{ github.event.number }}
cancel-in-progress: true
permissions: {}
jobs:
build:
name: Build
runs-on: ubuntu-24.04
permissions:
packages: write
strategy:
matrix:
package: [admin, api, db, public]
include:
- package: admin
build_context: ./
build_file: admin/Dockerfile
triggers: ('admin/' 'libs/')
- package: api
build_context: ./
build_file: api/Dockerfile
triggers: ('api/' 'libs/')
- package: db
triggers: ('db')
- package: public
build_context: ./
build_file: public/Dockerfile
triggers: ('public/' 'libs/')
steps:
- uses: actions/checkout@v4
- uses: bcgov/[email protected]
with:
package: ${{ matrix.package }}
build_context: ${{ matrix.build_context }}
build_file: ${{ matrix.build_file }}
keep_versions: 100
tag: ${{ github.event.number }}
tag_fallback: latest
token: ${{ secrets.GITHUB_TOKEN }}
triggers: ${{ matrix.triggers }}
deploy:
name: Deploy (${{ github.event.number }})
needs: [build]
secrets: inherit
uses: ./.github/workflows/.deploy.yml
with:
db_testdata: true
triggers: ('db/' 'libs/' 'api/' 'admin/' 'public/')
results:
name: PR Results
needs: [build, deploy]
if: always()
runs-on: ubuntu-24.04
steps:
- if: contains(needs.*.result, 'failure')||contains(needs.*.result, 'canceled')
run: echo "At least one job has failed." && exit 1
- run: echo "Success!"