Skip to content

Glob patterns not working for me #26145

Answered by weide-zhou
jchiatt asked this question in Actions
Discussion options

You must be logged in to vote

Hi @jchiatt ,

For ‘pull_request’ event, the default types are: opened, synchronize, and reopened. 

But to no avail. When I open a PR, it triggers, but it also seems to trigger even when_ no files were modified inside a path containing site-a._

_>> _If you triggered a workflow from PR but not close PR, edit a ‘not-site-a’ file,  the workflow will still be triggered since event type ‘synchronize’ is met, and ‘paths’ fiter check the whole PR  files including the previous ‘site-a’ file.

Hence, you can specify the type together with ‘paths’ to avoid this situation, code sample as below:

on:
  pull_request:
    types: opened
    paths:
      - ' **site-a**'

Hope it helps!

Replies: 5 comments

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
Comment options

You must be logged in to vote
0 replies
Answer selected
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
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback
3 participants