From ddd091af43114f49baf075fa534e92aedca81e2e Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Thu, 12 Oct 2023 12:53:26 +0800 Subject: [PATCH] Create job matrix using JSON array output --- .github/workflows/rebuild-changed.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rebuild-changed.yaml b/.github/workflows/rebuild-changed.yaml index 3987a05..c91ef79 100644 --- a/.github/workflows/rebuild-changed.yaml +++ b/.github/workflows/rebuild-changed.yaml @@ -48,9 +48,12 @@ jobs: name: Wait for rebuild to complete and report status needs: trigger-rebuild-for-modified runs-on: ubuntu-latest + strategy: + matrix: + build_id: ${{ fromJson(needs.trigger-rebuild-for-modified.outputs.builds) }} steps: - name: Install dependencies run: sudo apt-get install -y jq - - name: Show build IDs - run: echo "${{ needs.trigger-rebuild-for-modified.outputs.builds }}" + - name: Show build ID + run: echo "${{ matrix.build_id }}"