Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Pilot Lvl 1
Message 1 of 6

Path filtering for jobs and steps

It would be nice if we can have path filtering at the job and step level (without implementing this on our own).

With this feature, I can avoid creating different lint workflows for different types of files and unify them into one lint workflows with different jobs:

 

For example:

# lint-python.yml
name: lint-python
on:
  push:
    paths:
      - '**.py'

jobs:
  lint:
    - ...

# lint-markdown.yml
name: lint-markdown
on:
  push:
    paths:
      - '**.md'

jobs:
  lint:
    - ...

can be transformed into something like:

# lint.yml
name: lint
on: push

jobs:
  lint-python:
    - paths:
      - '**.py'
    - ...
  lint-markdown:
    - paths:
      - '**.md'
    - ...
5 Replies
Highlighted
Community Manager
Message 2 of 6

Re: Path filtering for jobs and steps

Hi @SamChou19815,

Thanks for this feedback! We're always working to improve GitHub and the GitHub Community Forum, and we consider every suggestion we receive. I've logged your feature request in our internal feature request list. Though I can't guarantee anything or share a timeline for this, I can tell you that it's been shared with the appropriate teams for consideration.


Thank you for your perspective and your contribution!
All the Best

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Highlighted
Copilot Lvl 3
Message 3 of 6

Re: Path filtering for jobs and steps

Definitely would like to see this feature implemented.

Highlighted
Ground Controller Lvl 2
Message 4 of 6

Re: Path filtering for jobs and steps

Would be very nice to have this.
GitHub could yo tell us what the status is on this feature request?

Highlighted
Ground Controller Lvl 1
Message 5 of 6

Re: Path filtering for jobs and steps

I created a custom action that solves exactly this problem. Take a look here, it might help you out!  

 

Bests,

Marcelo

Highlighted
Copilot Lvl 2
Message 6 of 6

Re: Path filtering for jobs and steps

I would love to have this feature!
We have several related cloud functions that we test together, but that we would like to deploy at a more granular level to speed up the workflow and rein in our deployments. We don't need to redeploy everything just because a single function changed, and having separate workflows with different triggers isn't really a solution because we would have to duplicate a lot of steps. I haven't explored using if filters for this yet, but having path based filtering would definitely simplify things.