Skip to content

Commit

Permalink
Merge e9c92b6 into 597f071
Browse files Browse the repository at this point in the history
  • Loading branch information
nakamasato authored May 25, 2024
2 parents 597f071 + e9c92b6 commit 44e68f3
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/matrix-from-previous-job-output-3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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
app: ${{ steps.filter.outputs.changes }}
include: ${{ steps.set-matrix.outputs.include }}
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 "include=[{\"app\": \"github-actions\", \"region\": \"pull_request1\"}, {\"app\": \"github-actions\", \"region\": \"pull_request2\"}]" >> "$GITHUB_OUTPUT"
execute:
strategy:
matrix:
app: ${{ fromJson(needs.set-matrix.outputs.app) }}
include: ${{ fromJson(needs.set-matrix.outputs.include) }}
runs-on: ubuntu-latest
needs: [set-matrix]
steps:
- name: "app: ${{ matrix.app }}, matrix: ${{ matrix.region }}"
run: |
echo "app: ${{ matrix.app }}, matrix: ${{ matrix.region }}"

0 comments on commit 44e68f3

Please sign in to comment.