Skip to content
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

Feature request: pre-commit hook for CI workflow files #383

Closed
hombit opened this issue Feb 5, 2024 · 3 comments · Fixed by #425
Closed

Feature request: pre-commit hook for CI workflow files #383

hombit opened this issue Feb 5, 2024 · 3 comments · Fixed by #425

Comments

@hombit
Copy link
Contributor

hombit commented Feb 5, 2024

Debugging GitHub actions is annoying, but hopefully we may help with it. It would be useful to have a pre-commit hook which would validate GitHub action files before we even push them. I've found this tool, but I'm not sure if it the only/best one:
https://github.com/mpalmer/action-validator

May be partially solved by implementing #382 instead

@camposandro
Copy link
Contributor

There's also the check-github-workflows hook suggested by pre-commit's development team. It also seems to download GitHub workflows schema to perform this type of validation:

# Verify that GitHub workflows are well formed
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.0
hooks:
- id: check-github-workflows
args: ["--verbose"]

@hombit
Copy link
Contributor Author

hombit commented Feb 14, 2024

Great, thank you!

@hombit hombit closed this as completed Feb 14, 2024
@hombit
Copy link
Contributor Author

hombit commented Feb 14, 2024

Sorry, I shouldn't close it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants