diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 66c3f43ff7..9f2344d0d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: diff: runs-on: ubuntu-latest outputs: - diff: ${{ steps.diff.outputs.diff }} + pkgs: ${{ steps.diff.outputs.pkgs }} steps: - uses: actions/checkout@v3 - uses: technote-space/get-diff-action@v6 @@ -31,13 +31,19 @@ jobs: y=$(echo $x | sed 's#projects/\(.*\)/[^/]*#\1#') RESULT="$RESULT $y" done - echo "diff=$RESULT" >> $GITHUB_OUTPUT + if [ -n "$RESULT" ]; then + RESULT="$(echo $RESULT | jq -R -s -c 'split(" ")')" + else + RESULT='["zlib.net"]' + fi + echo "pkgs=$RESULT" >> $GITHUB_OUTPUT build: needs: diff - name: ci ${{ matrix.platform.name }} + name: ci ${{ matrix.platform.name }} ${{matrix.pkg}} strategy: matrix: + pkg: ${{ fromJSON(needs.diff.outputs.pkgs) }} platform: - os: ["self-hosted", "macOS", "X64"] name: x64 @@ -66,7 +72,7 @@ jobs: - uses: pkgxdev/brewkit/build@v1 id: build with: - pkg: ${{ needs.diff.outputs.diff || 'zlib.net' }} + pkg: ${{ matrix.pkg }} - uses: pkgxdev/brewkit/audit@v1 if: steps.build.outputs.pkgspec