-
Notifications
You must be signed in to change notification settings - Fork 504
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
Auto update the latest runtime image daily #45
base: main
Are you sure you want to change the base?
Conversation
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.
This looks great, thank you!
Yes, I think you are right, currently main protection would stop the commit but the current setup does allow force pushes, so I added that as a suggestion :)
Looking at the readme of the action
the other option would be to create a token and exempt it from the branch protection, but I think this should work for now?
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "Update Astro Runtime to ${{ ENV.LATEST_RUNTIME }}" |
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.
commit_message: "Update Astro Runtime to ${{ ENV.LATEST_RUNTIME }}" | |
commit_message: "Update Astro Runtime to ${{ ENV.LATEST_RUNTIME }}" | |
push_options: --force |
Thanks @iancmoritz! One question - rather than exempting this from branch protections and having it force-push, can we have it open a PR? That way it's still less work for us, but we have a chance to review and intervene in case something weird happens (this actually did happen a few weeks ago where we had to roll back a PR because the image was available but hadn't been added to Astro yet). I've seen this sort of thing done with bots before, not sure if that can be done directly in an action or not. |
Motivation
Today, @TJaniF, @Mehul, etc have to keep this repo up to date with the latest version of the Astro Runtime by hand. As we start to add more examples to this repo, this is probably going to be more of an issue.
This PR introduces an action that runs daily at 12ET, checking the latest Astro Runtime version, and if there is a new version it updates to the latest.
Testing
I've tested this in my own personal fork github.com/iancmoritz/astro-example-dags, but feel free to test it out yourself!
In particular, we might need to adjust the branch permissions or something to make sure this action can push to main.