-
Notifications
You must be signed in to change notification settings - Fork 1
88 lines (80 loc) · 2.87 KB
/
Copy pathpr-open.yml
File metadata and controls
88 lines (80 loc) · 2.87 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Pull Request
on:
pull_request:
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
builds:
name: Builds
runs-on: ubuntu-24.04
permissions:
contents: read
attestations: write
id-token: write
packages: write
strategy:
matrix:
package: [api, database, frontend]
steps:
- uses: actions/checkout@v7
- uses: bcgov/actions/builder@ac9d89eede94f5f58d3446784c94cff634d98eac # v0.6.0
with:
package: ${{ matrix.package }}
tags: ${{ github.event.number || github.sha }}
tag_fallback: latest
token: ${{ secrets.GITHUB_TOKEN }}
- uses: shrink/actions-docker-registry-tag@e6aaef25c595b6e0edd18bf4c7dbfea3abd43299 # v5
with:
registry: ghcr.io
repository: ${{ github.repository }}/${{ matrix.package }}
target: ${{ github.event.number || github.sha }}
tags: ${{ github.sha }}
deploys:
name: Deploys
needs: [builds]
permissions:
contents: read
uses: ./.github/workflows/.deploy.yml
secrets: inherit
with:
autoscaling: false
tag: ${{ github.event.number }}
release_name: pubcode-${{ github.event.number }}
params: |
--set-string global.repository=${{ github.repository }} \
--set-string database.containers[0].tag="${{ github.sha }}" \
--set-string database.initContainers[0].tag="${{ github.sha }}" \
--set-string api.containers[0].tag="${{ github.sha }}" \
--set-string api.containers[0].resources.requests.cpu="30m" \
--set-string api.containers[0].resources.requests.memory="50Mi" \
--set-string frontend.containers[0].tag="${{ github.sha }}" \
--set-string frontend.containers[0].resources.requests.cpu="30m" \
--set-string frontend.containers[0].resources.requests.memory="50Mi" \
--set-string database.containers[0].resources.requests.cpu="30m" \
--set-string database.containers[0].resources.requests.memory="50Mi" \
--set-string database.initContainers[0].resources.requests.cpu="30m" \
--set-string database.initContainers[0].resources.requests.memory="50Mi" \
--set-string database.pvc.size="350Mi" \
--set-string global.env.VITE_SCHEMA_BRANCH=${{ github.event.pull_request.head.ref }} \
tests:
name: Tests
needs: [deploys]
permissions:
contents: read
uses: ./.github/workflows/.tests.yml
with:
target: ${{ github.event.number }}
results:
name: Results
if: always()
needs: [builds, deploys, tests]
runs-on: ubuntu-24.04
timeout-minutes: 1
steps:
- name: Fail if any dependent job failed or was cancelled
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1