-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace change detection GitHub Action #12188
Conversation
db0fc27
to
dd7e0b0
Compare
dd7e0b0
to
1d92054
Compare
1d92054
to
9f9acdf
Compare
.github/workflows/ci.yml
Outdated
while IFS= read -r file; do | ||
# Skip if file matches exclusion patterns. | ||
if [[ "$file" =~ ^docs/ && ! "$file" =~ ^docs/reference/(cli|settings).md && ! "$file" =~ ^docs/configuration/environment.md ]]; then | ||
echo "Skipping $file (matches `docs/` pattern)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These backticks are going to evaluate
❯ echo "foo `bar`"
zsh: command not found: bar
foo
9f9acdf
to
2dfd32a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
.github/workflows/ci.yml
Outdated
|
||
while IFS= read -r file; do | ||
# Skip if file matches exclusion patterns. | ||
if [[ "$file" =~ ^docs/ && ! "$file" =~ ^docs/reference/(cli|settings).md && ! "$file" =~ ^docs/configuration/environment.md ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use "${file}"
throughout — I don't think there's an attack vector here because of the way you're iterating but it's safer.
.github/workflows/ci.yml
Outdated
CODE_CHANGED=true | ||
break | ||
|
||
done <<< "$CHANGED_FILES" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done <<< "$CHANGED_FILES" | |
done <<< "${CHANGED_FILES}" |
.github/workflows/ci.yml
Outdated
break | ||
|
||
done <<< "$CHANGED_FILES" | ||
echo "code_any_changed=$CODE_CHANGED" >> "$GITHUB_OUTPUT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo "code_any_changed=$CODE_CHANGED" >> "$GITHUB_OUTPUT" | |
echo "code_any_changed=${CODE_CHANGED}" >> "$GITHUB_OUTPUT" |
- "!**/*.md" | ||
- "!bin/**" | ||
- "!assets/**" | ||
# Generated markdown and JSON files are checked during test runs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth retaining the comment on why we run tests on these files
2dfd32a
to
d057844
Compare
Summary
tj-actions/changed-files
no longer exists due to a malicious commit. This PR replaces it with a minimal shell script to get us unblocked.