-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (58 loc) · 2 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
name: PR
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploys:
runs-on: ubuntu-24.04
timeout-minutes: 10
outputs:
backend: ${{ steps.trigger.outputs.backend }}
database: ${{ steps.trigger.outputs.database }}
frontend: ${{ steps.trigger.outputs.frontend }}
strategy:
matrix:
name: [ backend, database, frontend ]
include:
- name: backend
file: templates/backend.yml
overwrite: true
verification_path: /api
- name: database
file: templates/database.yml
overwrite: false
- name: frontend
file: templates/frontend.yml
oc_version: 4.13
overwrite: true
post_rollout: |
oc create job "frontend-$(date +%s)" --from=cronjob/${{ github.event.repository.name }}-${{ github.event.number }}-cronjob
steps:
- uses: actions/checkout@v4
- id: deploys
uses: ./
with:
file: ${{ matrix.file }}
oc_namespace: ${{ vars.OC_NAMESPACE }}
oc_server: ${{ vars.OC_SERVER }}
oc_token: ${{ secrets.OC_TOKEN }}
oc_version: ${{ matrix.oc_version }}
overwrite: ${{ matrix.overwrite }}
parameters: -p ZONE=${{ github.event.number }} ${{ matrix.parameters }}
post_rollout: ${{ matrix.post_rollout }}
verification_path: ${{ matrix.verification_path }}
- id: trigger
run: echo "${{ matrix.name }}=${{ steps.deploys.outputs.triggered }}" >> $GITHUB_OUTPUT
results:
name: Results
runs-on: ubuntu-24.04
needs: [deploys]
steps:
- run: |
# Expand for outputs
echo "Results: ${{ toJson(needs.deploys.outputs) }}"
echo "Database triggered: ${{needs.deploys.outputs.database}}"
echo "Backend triggered: ${{needs.deploys.outputs.backend}}"
echo "Frontend triggered: ${{needs.deploys.outputs.frontend}}"