-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.49 KB
/
aux.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
63
64
name: API-test
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
deployments: write
jobs:
API-test-prep:
runs-on: ubuntu-latest
strategy:
matrix:
supportedVersion: ["test1", "test2"]
testVersion: ["ver1", "ver2"]
outputs:
test: ${{ steps.outputTest.outputs.test}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: testing outputs
id: outputTest
run: |
echo "test=${{matrix.supportedVersion}}" >> $GITHUB_OUTPUT
- name: testing the matrix write
uses: cloudposse/github-action-matrix-outputs-write@v1
id: out
with:
matrix-step-name: ${{ github.job }}
matrix-key: ${{ matrix.supportedVersion }}.${{ matrix.testVersion }}
outputs: |-
image: ${{ steps.outputTest.outputs.test }}
read:
runs-on: ubuntu-latest
needs: [API-test-prep]
steps:
- uses: cloudposse/github-action-matrix-outputs-read@v1
id: read
with:
matrix-step-name: API-test-prep
outputs:
result: "${{ steps.read.outputs.result }}"
API-test:
needs: read
runs-on: ubuntu-latest
strategy:
matrix:
supportedVersion: ["test1", "test2"]
testVersion: ["ver1", "ver2"]
steps:
- name: test
run: |
echo "test: ${{ fromJson(needs.read.outputs.result).image[format('{0}.{1}', matrix.supportedVersion, matrix.testVersion)] }}"