Use strategy matrix to check if paths was changed
See original GitHub issueFor example, I have targets
array in my matrix. Then I use this action to detect changed changed with filters named exactly the same as targets
:
jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
target: [first, second]
steps:
- name: Detect changes
uses: dorny/paths-filter@v2.2.0
id: changes
with:
filters: |
first:
- /some/path/**
second:
- some/another/path/**
Is there a way to check if matrix target
was filtered? Something like the following:
- name: My Action
if: contains(steps.changes.outputs, matrix.target)
run: echo "test"
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Using a matrix for your jobs - GitHub Docs
A matrix strategy lets you use variables in a single job definition to automatically create multiple job runs that are based on the...
Read more >Github Actions: How use strategy/matrix with script
It detects changed files and runs build job for changed directories. If directory name starts with OS name, it uses that name as...
Read more >How to Use the GitHub Actions Matrix Strategy in Deployments
Learn how to use the GitHub Actions Matrix deployment strategy and take your actions to the next level in this ATA Learning tutorial....
Read more >How-to Github Actions: Build Matrix - Nicola Corti
How to use Build Matrix to test your project against different version of a language, a library or an operating system.
Read more >Generating Dynamic GitHub Actions Workflows with the Job ...
Checking out the documentation, we found out that you can use a previous job's output as input for a job strategy, including the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Doesn’t this run your detect changes for each matrix entry? If that’s intended, you could just make the matching path a parameter of the matrix. Sth. like this (untested):
I overlooked, it works, thank you a lot!