Skip to content

Commit

Permalink
successful setup
Browse files Browse the repository at this point in the history
  • Loading branch information
isc-shuliu committed Jan 26, 2024
1 parent 0772ada commit 50a15f7
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions .github/workflows/dynamic.yaml
Original file line number Diff line number Diff line change
@@ -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 }} "

0 comments on commit 50a15f7

Please sign in to comment.