-
Notifications
You must be signed in to change notification settings - Fork 61
feat: add in a job to automatically generate and sync daily #147
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
Conversation
| - name: Commit changes if necessary | ||
| if: steps.check-for-changes.outputs.files_changed == 'true' | ||
| run: | | ||
| git config user.name "GitHub" |
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.
So github just provides an account you can use to do things like these?
Wild if so - I'm tempted to just merge this and run it manually to see if it works!
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.
Seems so, I took a lot of this from the way nvim-treesitter does this for their lock file.
| uses: peter-evans/create-pull-request@v4 | ||
| with: | ||
| title: "chore: generate and sync latest changes" | ||
| branch: generation |
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.
where are you git checkout -b this branch? or does this GHA do it for you?
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.
So I think technically we just commit it to master, but then the next step in create-pull-request specifies the branch. I think it must just take those changes, create a new branch, and then create the pr. Sort of copying this part from https://github.com/nvim-treesitter/nvim-treesitter/blob/5e9c6b6ba079a90a2545e651e3740b655b9ff035/.github/workflows/update-lockfile.yml#L40-L56.
eed3si9n
left a comment
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.
Thanks @ckipp01!
|
Alright, I'm gonna merge and we'll try it out. I fully expect something to not work right, but we'll see 😄 |
I was about to sync and send in a pr again, but I figured why not just automate this. This change adds a new CI job that will run every morning and detect if there are changes. If so, it will commit them and send in a pr.