-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
chore: add gh action to update app templates hash #3838
chore: add gh action to update app templates hash #3838
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.
Requesting changes just to understand the answer of my following question:
How does this handle if the hash is not changing? It seems like this will still create a PR but not sure what the create pr job actually handles this or not.
|
||
on: | ||
schedule: | ||
- cron: "0 * * * *" |
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.
Can you add a comment on what this cron is? I hate trying to read cron.
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.
You are right, this is for every hour, let me add that as a comment
I verified this behavior in the test repositories. If there is no change and workflow is going to exit without creating a PR (https://github.com/mndeveci/mock-cli/runs/6180064552?check_suite_focus=true).
And if next time this workflow runs with a change, it will create a PR (https://github.com/mndeveci/mock-cli/runs/6180080878?check_suite_focus=true). |
Test cases;
|
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.
LGTM
Co-authored-by: Chris Rehn <crehn@outlook.com>
Updated test cases;
|
Which issue(s) does this change fix?
N/A
Why is this change necessary?
We recently added a configuration file which keeps the latest commit hash from aws/aws-sam-cli-app-templates repositorty. This GH action is updating that hash value in configuration by running it every hour (or manually).
Test run in fork: https://github.com/mndeveci/aws-sam-cli/actions/runs/2223773270
Result PR in fork: mndeveci#3
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.