-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (44 loc) · 1.41 KB
/
build-push.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
name: radix-operator-build
on:
push:
branches:
- master
- release
permissions:
id-token: write
jobs:
get-target-configs:
name: Get target configs for branch
outputs:
target_configs: ${{ steps.get-target-configs.outputs.target_configs }}
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Get target configs
id: get-target-configs
run: |
configs=$(ls $GITHUB_WORKSPACE/.github/workflows/config/${GITHUB_REF_NAME} | jq -Rsc '. / "\n" - [""]')
echo "target_configs=${configs}" >> $GITHUB_OUTPUT
build-deploy-pipeline-and-operator:
name: " "
runs-on: ubuntu-20.04
needs:
- get-target-configs
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.get-target-configs.outputs.target_configs) }}
script: [build-push-operator.sh, build-push-pipeline.sh]
steps:
- uses: actions/checkout@v3
- name: Persist environment from ${{ matrix.config }} across steps
run: |
$GITHUB_WORKSPACE/.github/workflows/scripts/persist-env.sh ${{ matrix.config }}
- uses: azure/login@v1
with:
client-id: ${{ env.AZURE_CLIENT_ID }}
tenant-id: ${{ env.AZURE_TENANT_ID }}
subscription-id: ${{ env.AZURE_SUBSCRIPTION_ID }}
- name: Build and push image
run: |
$GITHUB_WORKSPACE/.github/workflows/scripts/${{ matrix.script }}