-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat(templates): add workflow to update workflows from templates #244
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Richard Steinmetz <[email protected]>
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.
Nice! I like it :)
The thing is, these are templates. Mail app (with it's stable branches) is the prime example where you will have a PR every time and you actually don't want the changes, e.g. stable25 was dropped already in june from https://github.com/nextcloud/mail/blob/main/.github/workflows/psalm-matrix.yml#L21 because 25 is covered by a stable branch. So since then every weekend you would have received a PR to readd it. So we would need something like a "lock" file for the workflows and then it could be logged that a PR for a version was sent and upstream had no interest and we are not retrying it. Atm I usually tried to include this to my version bump PRs, because I have to adjust some of the files there anyway, but it gets more and more complicated, so looking forward to a solution, but I guess it's just not that simple by default :P |
I still think the workflow makes sense even in its current form. Each maintainer can now decide if the currently implementation is good enough for them or not. But the workflow will take care of any update to the template for possible improvements in the future |
Co-authored-by: John Molakvoæ <[email protected]> Signed-off-by: Richard Steinmetz <[email protected]>
Co-authored-by: Simon L. <[email protected]> Signed-off-by: Richard Steinmetz <[email protected]>
Idea how to solve: #244 (comment) We could add a "random string"/"date+time" in the first comment block each file has, that has to be modified everytime the file is changed. This way we could just check if the "identifier" line matches:
An app like mail could then simply update the identifier line only and would be save from "downgrading" PRs every week. |
#248 and #249 should remove the need to update stable branches in the workflows. Maybe the workflow can check if the workflow is changed from upstream and skip updating it when it is (and leave a note about it in the pr). Or event attempt to merge the change into the new template |
What about being able to define the branches that the workflow runs against in a separate file per repo and the matrix then gets generates from that file? This would skip the need of having to change the workflow in order to adjust the branches that it runs against. |
Demo run at https://github.com/st3iny/mail/actions/runs/6681157551/job/18155010149
Note: It fails as expected due to not being able to create the PR. The token secret will take care of that in a real repo.
Problems