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

Auto update the latest runtime image daily #45

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

iancmoritz
Copy link
Collaborator

@iancmoritz iancmoritz commented May 4, 2024

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.

@iancmoritz iancmoritz changed the title add initial scaffold for action Auto update the latest runtime image daily May 4, 2024
@iancmoritz iancmoritz marked this pull request as ready for review May 4, 2024 01:54
@iancmoritz iancmoritz self-assigned this May 4, 2024
Copy link
Contributor

@TJaniF TJaniF left a 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 }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
commit_message: "Update Astro Runtime to ${{ ENV.LATEST_RUNTIME }}"
commit_message: "Update Astro Runtime to ${{ ENV.LATEST_RUNTIME }}"
push_options: --force

@kentdanas
Copy link
Collaborator

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.

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 this pull request may close these issues.

3 participants