Skip to content

Update matrix-from-previous-job-output-3.yml #20

Update matrix-from-previous-job-output-3.yml

Update matrix-from-previous-job-output-3.yml #20

name: matrix-from-previous-job-output-3
on:
pull_request:
push:
jobs:
# From https://github.com/dorny/paths-filter
# JOB to run change detection
set-matrix:
runs-on: ubuntu-latest
outputs:
# Expose matched filters as job 'app' output variable
packages: ${{ steps.filter.outputs.changes }}
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
github-actions:
- '.github/workflows/**'
poetry:
- 'poetry/**'
- name: set matrix
id: set-matrix
run: |
echo "matrix=[\"pull_request1\", \"pull_request2\"]" >> "$GITHUB_OUTPUT"
execute:
strategy:
matrix:
matrix: ${{ fromJson(needs.set-matrix.outputs.matrix) }}
runs-on: ubuntu-latest
needs: [set-matrix]
steps:
- run: |
echo "matrix: ${{ matrix.matrix }}"