Out of the box, GitHub Actions makes it possible to run workflows conditionally on the modification of a path:
on: push: paths: -'foo/\*\*/\*'
I have the vague memory that there was a time where
github.event.head_commit.modified resolved to an array of modified paths. Which would allow:
jobs: job1: if: contains(github.event.head_commit.modified, 'foo/package.json') ... steps: - if: contains(github.event.head_commit.modified, 'foo/bar/package.json')
It’s easy enough to use that action to impose conditions on running a step, but I would like to put conditions on jobs inside a workflow. Since there is a steps, but not a jobs context, this is not straightforward. Any idea of how I could achieve this result?