Repository navigation
69 lines (63 loc) · 2.05 KB
/
Copy pathpr-open.yml
File metadata and controls
69 lines (63 loc) · 2.05 KB
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
name: PR
on:
pull_request:
branches: [main]
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
permissions: {}
jobs:
# https://github.com/bcgov/actions/tree/main/builder
builds:
name: Builds
permissions:
attestations: write # Required for creating attestations
contents: read # Required for repository access
id-token: write # Required for OIDC token generation
packages: write # Required for pushing images
runs-on: ubuntu-26.04
strategy:
matrix:
package: [backend-java, backend-py, migrations-py]
include:
- package: backend-java
triggers: ('backend-java/')
- package: backend-py
triggers: ('backend-py/')
- package: migrations-py
triggers: ('backend-py/db')
build_context: ./backend-py/db
build_file: ./backend-py/db/Dockerfile
steps:
- uses: bcgov/actions/builder@79aefe3a7abb2d0d00b1b3ea4cfbf12727a10638 # v0.9.0
id: builds
with:
build_context: ${{ matrix.build_context }}
build_file: ${{ matrix.build_file }}
package: ${{ matrix.package }}
tag_fallback: latest
triggers: ${{ matrix.triggers }}
deploys:
name: Deploys (${{ github.event.number }})
permissions:
contents: read
needs: [builds]
uses: ./.github/workflows/.deploy.yml
secrets:
oc_namespace: ${{ vars.OC_NAMESPACE }}
oc_token: ${{ secrets.OC_TOKEN }}
with:
target: ${{ github.event.number }}
tag: ${{ github.event.pull_request.head.sha }}
triggers: ('backend-java/' 'backend-py/' 'common/' '.github/workflows/')
results:
name: PR Results
needs: [builds, deploys]
if: always()
runs-on: ubuntu-26.04
steps:
- uses: bcgov/actions/workflow-results@79aefe3a7abb2d0d00b1b3ea4cfbf12727a10638 # v0.9.0
with:
needs: ${{ toJson(needs) }}
title: "PR Results"