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

Github Automation #24

Open
2 of 5 tasks
oakbrad opened this issue Apr 9, 2024 · 5 comments
Open
2 of 5 tasks

Github Automation #24

oakbrad opened this issue Apr 9, 2024 · 5 comments
Labels

Comments

@oakbrad
Copy link
Owner

oakbrad commented Apr 9, 2024

Learn more about Github Actions, Git Hooks, Git Runners.

  • Pre Commit - Check against 5eTools schema?
  • Post Commit
    • Run getbrew.sh via ssh (currently being done in crontab on the server)
    • Generate missing token images?
  • Automate ImgBot optimization
@oakbrad
Copy link
Owner Author

oakbrad commented Jun 2, 2024

Auto approve the imgbot pull requests: https://medium.com/@dileepkumarjami/auto-approve-and-merge-pull-requests-by-dependabot-using-github-actions-468557967fa4

oakbrad added a commit that referenced this issue Jun 2, 2024
oakbrad added a commit that referenced this issue Jun 2, 2024
oakbrad added a commit that referenced this issue Jun 2, 2024
oakbrad added a commit that referenced this issue Jun 5, 2024
oakbrad added a commit that referenced this issue Jun 5, 2024
oakbrad added a commit that referenced this issue Jun 5, 2024
oakbrad added a commit that referenced this issue Jun 5, 2024
oakbrad added a commit that referenced this issue Jun 5, 2024
oakbrad added a commit that referenced this issue Jun 5, 2024
oakbrad added a commit that referenced this issue Jun 5, 2024
@oakbrad
Copy link
Owner Author

oakbrad commented Jun 5, 2024

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.

oakbrad added a commit that referenced this issue Jun 5, 2024
@oakbrad
Copy link
Owner Author

oakbrad commented Jun 23, 2024

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:

  • StackOverflow discussion suggestions:
    • Use act locally
    • Tool agnostic - bash scripts or Dockerfiles and just have the Action run that command
    • Clone to private repo and fuck with it there
    • Create a dummy action YAML, then fork it and fuck with it. Squash into one commit and re-merge.
    • Self host it https://github.com/actions/runner

oakbrad added a commit that referenced this issue Jul 11, 2024
oakbrad added a commit that referenced this issue Jul 11, 2024
oakbrad added a commit that referenced this issue Jul 11, 2024
@oakbrad
Copy link
Owner Author

oakbrad commented Jul 11, 2024

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.

@oakbrad
Copy link
Owner Author

oakbrad commented Jul 11, 2024

@oakbrad oakbrad added the chore label Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant