Skip to content

It's possible to not run every version in the matrix? #25406

Answered by Yanjingzhu
luchiago asked this question in Actions
Discussion options

You must be logged in to vote

Hi @luchiago , 

There is a new function fromJson() to dynamicly set matrix setting.

You could add another job to get the changed file on the pull request and then set matrix setting depending on it. 

There is a previous ticket for finding pull request file changes : https://github.community/t5/GitHub-Actions/Get-list-of-files-on-pull-request-merge/td-p/41570 

Then you could follow my example workflow to set python version in matrix .

jobs:
  getchange:
   outputs:
      matrix: ${{ steps.changes.outputs.matrix }}
   runs-on: ubuntu-latest
   steps:
     - id: changes
       ## set matrix value based on file changes
       run: |
         ....... // write your script to get file change the…

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants