-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
chore: Make YAML workflow git-based #7477
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,12 @@ name: YAML Validation | |
on: | ||
pull_request: | ||
paths: | ||
- '**.y?ml' | ||
- '**.yml' | ||
- '**.yaml' | ||
push: | ||
paths: | ||
- '**.y?ml' | ||
- '**.yml' | ||
- '**.yaml' | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
@@ -21,4 +23,4 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- name: Run yamllint | ||
run: find . -path \*/vendor -prune -false -o -name \*.y*ml | xargs yamllint | ||
run: git ls-files --cached -z -- '*.y*ml' | xargs --null -- yamllint | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Explanation:
I am not 100% sure if it's needed here, we could use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I cannot take the risk of having space - or line end - characters in file names. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
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.
Explicit is better than implicit.