Open oakbrad opened 7 months ago
Auto approve the imgbot pull requests: https://medium.com/@dileepkumarjami/auto-approve-and-merge-pull-requests-by-dependabot-using-github-actions-468557967fa4
I clearly have no idea what I'm doing, I should figure out how to test these without pushing a change.
Run ammarlakis/action-ajv@master
with:
schema: .github/homebrew-schema.json
data: 5etools-homebrew/*json
allErrors: true
Error: Failed to validate: no schema with key or ref "https://json-schema.org/draft/2020-12/schema"
Not sure if I'm doing this right, will look into it again later. It did catch errors in the Rider-Waite file, but then fixing those failed with this error.
Yes running the npx command works, but fails on not being able to find the files. I probably need to pull the repo first?
On testing Github Actions locally, apparently I am not that dumb there really is no built in way to test Actions without pushing it and then waiting for the stupid thing to run:
Ok so now what needs to happen is I need to merge the validate and the update actions into one file.
Set the remote update to needs:
the validation job.
Then update will only happen after the schema validates the file. This prevents errors from being able to enter the production site data.
Rejecting on failed validation check: https://stackoverflow.com/questions/58654530/how-to-auto-reject-a-pull-request-if-tests-are-failing-github-actions
Learn more about Github Actions, Git Hooks, Git Runners.