diff --git a/.github/workflows/dynamic.yaml b/.github/workflows/dynamic.yaml index 1b727e9..fd0933f 100644 --- a/.github/workflows/dynamic.yaml +++ b/.github/workflows/dynamic.yaml @@ -1,23 +1,27 @@ name: dynamic-matrix -on: [ push, pull_request ] +on: [push, pull_request] jobs: - set: - runs-on: ubuntu-20.04 + matrix-setup: + runs-on: ubuntu-latest + env: + PM_URL: https://pm.community.intersystems.com/packages/-/all?allVersions=1 + JQ_SCRIPT: reduce .[] as $item ([]; if $item.allVersions | length >= 65 then . + [$item.name] else . end) outputs: - matrix: ${{steps.list_dirs.outputs.matrix}} + matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - uses: actions/checkout@v2 - - id: list_dirs - run: echo 'matrix={1, 2, 3}' >> $GITHUB_OUTPUT + - id: set-matrix + run: | + matrix=$(curl -L "$PM_URL" | jq -cr "$JQ_SCRIPT") + echo "matrix=$matrix" >> $GITHUB_OUTPUT - get: - runs-on: ubuntu-20.04 - needs: set + run-builds: + runs-on: ubuntu-latest + needs: matrix-setup strategy: matrix: - subdir: ${{fromJson(needs.set.outputs.matrix)}} + package: ${{ fromJson(needs.matrix-setup.outputs.matrix) }} steps: - name: print - run: echo "MATRIX ${{ matrix.subdir }} " + run: echo "MATRIX ${{ matrix.package }} "