Skip to content

test

test #5

Workflow file for this run

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 }}
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}', matrix.supportedVersion)] }}"