This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
99ae12a
check github actions yamls
galargh 5b53e32
make yaml linter happy about go-test
galargh 810e6fb
mention VS Code YAML extension in the readme
galargh f805e7c
add info about other YAML checking extensions
galargh 3636266
make yaml checker more generic
galargh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
on: | ||
pull_request: | ||
paths: | ||
- '**/action.yml' | ||
- '**/action.yaml' | ||
- '**/.github/workflows/*.yml' | ||
- '**/.github/workflows/*.yaml' | ||
|
||
name: Check YAML | ||
|
||
jobs: | ||
check-yaml: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# TODO: switch to mainline once https://github.com/nwisbeta/validate-yaml-schema/pull/21 is merged | ||
- uses: galargh/validate-yaml-schema@c8060d4a389d0eec986a90665bf0c496bf1f52e8 | ||
with: | ||
yamlSchemasJson: | | ||
{ | ||
"https://json.schemastore.org/github-action.json": ["**/action.yml", "**/action.yaml"], | ||
"https://json.schemastore.org/github-workflow.json": ["**/.github/workflows/*.yml", "**/.github/workflows/*.yaml"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
was the old syntax wrong? I'm a bit confused because it apparently worked just fine :)
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 worked but the schema from https://json.schemastore.org/github-workflow.json didn't account for it. I'll see if there's a way to express what we were doing in that schema - if so I'll create a PR but, personally, I'd be fine with the setup proposed here too.
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 see. Slight preference for keeping what we had, because it was simpler, but I also don't think it matters too much :)
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 had a look at JSON schema and it seems it'd be quite complicated to add that
runs-on
accepts any prefix of a valid runner name + expression syntax + any suffix of a valid runner name so if you don't mind, I'd stick with the string format.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.
SGTM! Thanks for being thorough :)