Can't get ignore-paths:
to do what I want
#25957
-
Hi! I’m trying to get my workflow skipped if any of the changed paths by a push to the master branch is
However, it doesn’t seem to be working. See https://github.com/rubygems/rubygems/actions/runs/169757578/workflow, where the workflow run even though the push was changing I think I must be missing something very obvious but I can’t see it. Thanks so much! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Oh! I think it might be due to the fact that the |
Beta Was this translation helpful? Give feedback.
-
If your commits contains other files which out of ‘path-ignore’ configurations, the push event will be triggered. For your setting, if you only change in bundler/CHANGELOG.md in master branch, the workflow will NOT be triggered. As an alternative, you can get the file list from the ${{ github.sha }}(link here), check if the bundler/CHANGELOG.md exists, skip the jobs then. Thanks. |
Beta Was this translation helpful? Give feedback.
-
Mmmmm, right. Aren’t the docs a bit confusing?
This sounds exactly like what I was interpreting. Although the example later on actually explains the real behavior. I’ll try an alternative, thanks!! |
Beta Was this translation helpful? Give feedback.
Hi @deivid-rodriguez,
If your commits contains other files which out of ‘path-ignore’ configurations, the push event will be triggered.
For your setting, if you only change in bundler/CHANGELOG.md in master branch, the workflow will NOT be triggered.
As an alternative, you can get the file list from the ${{ github.sha }}(link here), check if the bundler/CHANGELOG.md exists, skip the jobs then.
Thanks.