-
-
Notifications
You must be signed in to change notification settings - Fork 642
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
Add bump-go action #702
Add bump-go action #702
Conversation
Signed-off-by: eternal-flame-AD <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #702 +/- ##
=======================================
Coverage 80.46% 80.46%
=======================================
Files 56 56
Lines 2191 2191
=======================================
Hits 1763 1763
Misses 337 337
Partials 91 91 ☔ View full report in Codecov by Sentry. |
925190d
to
18c56da
Compare
Signed-off-by: eternal-flame-AD <[email protected]>
What do you think of this plan? @jmattheis To test the current solution on actual GH actions, merge, close #701, delete the bump-go branch, then trigger the workflow by dispatch or cron. |
Signed-off-by: eternal-flame-AD <[email protected]>
--body "This PR was automatically created by the bump-go action." | ||
else | ||
first_id=$(echo "$existing_prs" | sort -nr | head -n 1) | ||
gh pr edit $first_id --title "$PR_KEYWORD Bump Go to $latest_version" |
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.
Have you considered using renovate / dependabot for this https://docs.renovatebot.com/modules/manager/regex/. I haven't used this specific feature of renovate, but renovate should provide the logic for opening PRs when there is a new version, and updating existing PRs with newer versions. I think the config could look like this
{
"regexManagers": [
{
"fileMatch": ["^GO_VERSION$"],
"matchStrings": ["^(?<currentValue>\\d+\\.\\d+\\.\\d+)$"],
"datasourceTemplate": "docker",
"depNameTemplate": "golang"
}
]
}
We probably could reference the gotify/build image there, so that it would only create a PR when there is a newer gotify/build image. We could then also add renovate to gotify build to update when there are newer golang docker images.
Generally, I'd rather use these tools than custom scripts as they seem easier to maintain, and I think gotify could also benefit from automatic dep updates (at least for the backend).
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.
Yeah makes sense I support this, although you are in a better position to introduce a new tool like this (I think I don't even have the permission to do it).
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.
I've added renovate to gotify/server and gotify/build. It needs configuration in the repo, there we probably have to only whitelist Go / docker, so that it doesn't update the js deps for now.
Replaced by #706 |
Rel: #699
Current logic:
If the stable Go version does not equal GO_VERSION on master and does not equal the version on the bump-go branch then create or update a PR.
Whether to go for a fully automated release I think let's wait and see for maybe 2 cycles and if minimal intervention is required then we can make this automated. I think this should have already taken off a large portion of wasted time for releases which is waiting for CI to finish..
For a fully automated workflow I think the general idea of what to do next is: