ci: Add workflow to regenerate static assets#1457
Conversation
|
@TwiN We can start thinking about how to test/introduce this properly. Does the current version already cover all the needs for this repo? I don't want to make it more complicated than it needs to be. The issue with testing is that the workflow trigger |
|
There's no need to test this. I'll manually test it once it's merged in the master branch, and make adjustments as necessary. |
|
There are still two open questions I have:
The restriction to require reviews required probably makes sense and if reviews are required the restriction to only allow non-draft PRs makes sense too since draft PRs can not be approved, I think. |
|
Yes for the former, no for the latter. Does this currently not work for draft PRs? |
The default for the action is not to allow it. I enabled it now. Have I understood correctly: The wanted behavior is like this? allow_drafts: true
skip_ci: true # Meaning CI check do not need to pass to allow updating static assets
skip_reviews: false # Meaning there needs to be a review before updating static assets is allowedIf any conditions fail the action will add a comment to the PR explaining which condition is not met, e.g PythonGermany#23 (comment) |
|
Just tested it again, in my fork it works just as intended: PythonGermany#18 (comment) |
|
@PythonGermany To answer your questions, it seems to be perfectly configured as-is in your branch |
|
Great to hear. If there are any issues let me know! |
This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/twin/gatus](https://github.com/TwiN/gatus) | minor | `v5.33.1` → `v5.34.0` | --- ### Release Notes <details> <summary>TwiN/gatus (ghcr.io/twin/gatus)</summary> ### [`v5.34.0`](https://github.com/TwiN/gatus/releases/tag/v5.34.0) [Compare Source](TwiN/gatus@v5.33.1...v5.34.0) Hello users of Gatus. I'm not a fan of mixing my personal life with open source, but I do believe in transparency, and those of you actually reading release notes are most definitely deserving of that transparency *(does anybody actually read this? if you're reading this, can you react to this release note with the least used release note emoji, "😄"? For all I know, it's always the same 10 people reading this. Or don't, really, ~~2025~~ 2026's internet has enough forced engagement as it is)*. Some of you may have noticed that in the past 6-8 weeks, reviews and merges have slowed down. This is because a few months ago, I became a father, and unlike a computing process, I can't send my child to sleep with a single command, nor can I use a debugger to find out what the problem is. I had heard that *"babies slept 16 hours a day"* before I had my own, but never could I have imagined this meant they had 16 separate 1 hour nap. I have also returned to work, because unfortunately, Gatus is just a side project for me and isn't my full time job, and while I have sufficient strength in me to handle both a full time job and being a father, I'm having a hard time maintaining my open source projects as well. I'm getting better every day, but I suspect it'll take a few months until things get back to normal. Anyways, I wish you all a wonderful 2026. Things are tough right now, but just remember you're not alone. Try to not focus on everything wrong with the world, the list is long enough to keep you unhappy. Never take life too seriously. Nobody gets out alive anyways. Happy new year, TwiN *** #### What's Changed - feat(alerting): ClickUp alerting provider by [@​TheBinaryGuy](https://github.com/TheBinaryGuy) in [#​1462](TwiN/gatus#1462) - fix(client): Switch websocket library by [@​joy4eg](https://github.com/joy4eg) in [#​1423](TwiN/gatus#1423) - fix(ui): Inconsistent time values in UI by [@​PythonGermany](https://github.com/PythonGermany) in [#​1452](TwiN/gatus#1452) - chore(ui): Remove unnecessary eslint rule disables by [@​PythonGermany](https://github.com/PythonGermany) in [#​1422](TwiN/gatus#1422) - ui: Disable hover effect if no link is set by [@​PythonGermany](https://github.com/PythonGermany) in [#​1419](TwiN/gatus#1419) - ci: Add workflow to regenerate static assets by [@​PythonGermany](https://github.com/PythonGermany) in [#​1457](TwiN/gatus#1457) - ci: Add platform input for custom action workflow by [@​PythonGermany](https://github.com/PythonGermany) in [#​1437](TwiN/gatus#1437) - docs(alerting): Remove warning for Splunk alerting provider by [@​luketainton](https://github.com/luketainton) in [#​1475](TwiN/gatus#1475) - docs: Separate web and ui config into sections by [@​PythonGermany](https://github.com/PythonGermany) in [#​1439](TwiN/gatus#1439) - docs: Add missing alert provider group override options by [@​PythonGermany](https://github.com/PythonGermany) in [#​1467](TwiN/gatus#1467) - docs: Update Telegram User ID to Chat ID in README by [@​gshpychka](https://github.com/gshpychka) in [#​1434](TwiN/gatus#1434) - docs: Update config section and add env var faq by [@​PythonGermany](https://github.com/PythonGermany) in [#​1450](TwiN/gatus#1450) #### New Contributors - [@​gshpychka](https://github.com/gshpychka) made their first contribution in [#​1434](TwiN/gatus#1434) - [@​TheBinaryGuy](https://github.com/TheBinaryGuy) made their first contribution in [#​1462](TwiN/gatus#1462) - [@​luketainton](https://github.com/luketainton) made their first contribution in [#​1475](TwiN/gatus#1475) **Full Changelog**: <TwiN/gatus@v5.33.1...v5.34.0> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi42OS4yIiwidXBkYXRlZEluVmVyIjoiNDIuNjkuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW1hZ2UiXX0=--> Reviewed-on: https://gitea.alexlebens.dev/alexlebens/infrastructure/pulls/3036 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
|
It's perfect! The only thing I'd change about it is perhaps add a comment to the PR if no changes are detected, and if possible, also add the workflow status to the PR as it seems to just be running with no status indication, but honestly that's nitpicking. As-is, I find the feature very useful. Thank you again for taking the time to add it :) |
That's a simple change: I opened a PR for this and other adjustments #1480 🎉 My initial idea/approach was to only post comments if absolutely necessary and work with reactions on the initial triggering comment instead -> Advantage: no notification spam; Disadvantage: No notifications and not very intuitive since the reactions are quite limited on GitHub. The only scenario where it somewhat works is for the success scenario when a commit is created after a while.
I'm not sure if I understand exactly what you mean. Do you mean adding (maybe prepending?) the status of the workflow to the PR title? If that is what you mean I would suggest using labels instead, because the title approach is not scalable to multiple workflows that want to indicate a custom status. The only status indications for the workflow currently are the comment reactions. E.g the 👀 reaction indicating the workflow has started, which seems to be the "standard" for workflows triggered by a user comment, actualbudget for example has a ton of workflows that do it this way. Maybe I just don't get what you mean and you are referring to another type of status indication? Another idea I have would be to create a comment informing that the workflow has started with a link to the workflow status site and then update the comment with the corresponding status once the workflow has completed. |
|
No, no, I'm referring to adding the regenerate assets workflow that runs to the PR's list of actions when it runs, if it's possible. So like if I wrote the comment that triggers the workflow, it would show up in the list of statuses on the PR |

Summary
Closes #1454. This workflow will never work if the pull request author has set the PR option
Allow edits and access to secrets by maintainersto false.I am currently not sure how to easily test if the permissions are given to push to the feature branch of the PR in the forked repo when the workflow runs in the base repo.
If there are no checkout or push permission issues the workflow works. I already tested it with PRs in my fork with the base in the same repository.
TODO
Checklist
README.md, if applicable.