Backport of [NET-11150] ci: fix conditional skip and add safeguard into release/1.1.x #639
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This PR is auto-generated from #637 to be assessed for backporting due to the inclusion of the label backport/1.1.
🚨
The person who merged in the original PR is:
@zalimeni
This person should manually cherry-pick the original PR into a new backport PR,
and close this one when the manual backport PR is merged in.
The below text is copied from the body of the original PR.
Fix CI skip workflow by adopting
tj-actions/changed-files
(used by several otherhashicorp
repos) and putting in safeguards to avoid false negatives on changed files due to inappropriate workflow triggers.Reproduced bug (skipped checks on
Dockerfile
change): https://github.com/hashicorp/consul-dataplane/actions/runs/10984338025/job/30494819791?pr=630#step:3:14Debugging 🧵 for posterity, which has some notes w/ more background on our previous script and potential gotchas: https://go.hashi.co/net-11150-debugging-slack
PRs for other repos:
Testing
pull_request
retrieves changes between base and feature branch: https://github.com/hashicorp/consul-dataplane/actions/runs/11017376755/job/30595124657?pr=637#step:4:64Prints both skippable and non-skippable files: https://github.com/hashicorp/consul-dataplane/actions/runs/11017376755/job/30595124657?pr=637#step:5:12
Skip test: https://github.com/hashicorp/consul-dataplane/actions/runs/11018306352/job/30598259268?pr=638#step:6:6
Safeguard test: https://github.com/hashicorp/consul-dataplane/actions/runs/11016637261/job/30592629656?pr=636#step:2:14
Simulated
push
with non-skippable commit (diff is just latest commit): https://github.com/hashicorp/consul-dataplane/actions/runs/11020606567/job/30605759628#step:3:62Simulated
push
with skippable commit (diff is just latest commit): https://github.com/hashicorp/consul-dataplane/actions/runs/11020613882/job/30605785364#step:4:12Overview of commits