Closed ringods closed 2 weeks ago
@ringods So that I can understand your thoughts: You appended wildcards to the pull_request_target
paths because otherwise pull_request_target
would only get triggered when one of the directories would be changed, but because Git has no concept of directory changes but only file changes pull_request_target
never gets triggered at all.
Right?
Interestingly enough the GitHub documentation only shows examples with wildcards appended 😆 https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/triggering-a-workflow#using-filters-to-target-specific-paths-for-pull-request-or-push-events
@tmeckel indeed. I was wondering why the pull_request_target
event wasn't triggered and I guess it is because only the folder name doesn't match any of the files within.
The
pull-request
workflow should handle 2 cases:pull_request
event: a PR created directly in theinfra
repository by an authorized userpull_request_target
event: a PR created in a fork of theinfra
repository by an external contributor when the changes only map to the YAML config filesMy previous PR, #228, only changed such config files, but still the
pull_request
event was triggered:https://github.com/pulumiverse/infra/actions/runs/11250271518
I'm guessing that the
pull_request_target
event wasn't sent because it didn't match the folder names. Hence, the proposed change is to add wildcards after each.