-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.22 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
name: PR
on:
pull_request:
concurrency:
# PR open and close use the same group, allowing only one at a time
group: ${{ github.event.number }}
cancel-in-progress: true
jobs:
builds:
name: Builds
runs-on: ubuntu-24.04
permissions:
packages: write
steps:
- uses: bcgov-nr/action-builder-ghcr@v2.2.0
with:
package: sync
tag: ${{ github.event.number }}
tag_fallback: latest
triggers: ('sync/')
# Will address this when move the actual sync job to this repository.
# 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!
# remove deploys until got the actual sync job running in this repo
# [builds, deploys]
needs: [builds]
runs-on: ubuntu-24.04
steps:
- run: |
# View results
echo "needs.*.result: ${{ toJson(needs.*.result) }}"
- if: contains(needs.*.result, 'failure')||contains(needs.*.result, 'canceled')
run: |
# Job failure found
echo "At least one job has failed"
exit 1