pulumiverse / infra

IaC for all infrastructure required by Pulumiverse
Apache License 2.0
6 stars 15 forks source link

Add wildcards to paths #230

Closed ringods closed 2 weeks ago

ringods commented 2 weeks ago

The pull-request workflow should handle 2 cases:

My previous PR, #228, only changed such config files, but still the pull_request event was triggered:

https://github.com/pulumiverse/infra/actions/runs/11250271518

Screenshot 2024-10-11 at 15 51 40

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.

tmeckel commented 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

ringods commented 2 weeks ago

@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.