Skip to content

ci: Add workflow to regenerate static assets#1457

Merged
TwiN merged 7 commits intoTwiN:masterfrom
PythonGermany:add-workflow-to-regenerate-static-assets
Dec 22, 2025
Merged

ci: Add workflow to regenerate static assets#1457
TwiN merged 7 commits intoTwiN:masterfrom
PythonGermany:add-workflow-to-regenerate-static-assets

Conversation

@PythonGermany
Copy link
Contributor

@PythonGermany PythonGermany commented Dec 18, 2025

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 maintainers to 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

  • Make sure only trusted sources can trigger workflow, e.g. a specific actor or only people with write access! -> covered by github/command action

Checklist

  • (n/a) Tested and/or added tests to validate that the changes work as intended, if applicable.
  • (n/a) Updated documentation in README.md, if applicable.

@github-actions github-actions bot added the feature New feature or request label Dec 18, 2025
@PythonGermany
Copy link
Contributor Author

@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 issue_comment only works once the workflow is in the default branch. I don't know how to test if everything works in terms of permissions, since I'd probably first need to create a second GitHub user to fork a test repo containing the new workflow to test the whole final scenario before actually merging it. Can you think of an easier way?

@PythonGermany PythonGermany marked this pull request as ready for review December 19, 2025 18:16
@TwiN
Copy link
Owner

TwiN commented Dec 20, 2025

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.

@PythonGermany
Copy link
Contributor Author

PythonGermany commented Dec 20, 2025

There are still two open questions I have:

  • Whether or not to allow the workflow to be run on draft pull requests
  • Whether or not to require reviews before this workflow can be run

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.

@TwiN
Copy link
Owner

TwiN commented Dec 21, 2025

Yes for the former, no for the latter.

Does this currently not work for draft PRs?

@PythonGermany
Copy link
Contributor Author

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 allowed

If any conditions fail the action will add a comment to the PR explaining which condition is not met, e.g PythonGermany#23 (comment)

@PythonGermany
Copy link
Contributor Author

PythonGermany commented Dec 21, 2025

Just tested it again, in my fork it works just as intended: PythonGermany#18 (comment)

Copy link
Owner

@TwiN TwiN left a comment

Choose a reason for hiding this comment

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

Excellent work, @PythonGermany!

@TwiN
Copy link
Owner

TwiN commented Dec 22, 2025

@PythonGermany To answer your questions, it seems to be perfectly configured as-is in your branch

@TwiN TwiN changed the title feat(ci): Add workflow to regenerate static assets ci: Add workflow to regenerate static assets Dec 22, 2025
@TwiN TwiN merged commit 138f5bf into TwiN:master Dec 22, 2025
@PythonGermany
Copy link
Contributor Author

Great to hear. If there are any issues let me know!

alexlebens pushed a commit to alexlebens/infrastructure that referenced this pull request Jan 4, 2026
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 [@&#8203;TheBinaryGuy](https://github.com/TheBinaryGuy) in [#&#8203;1462](TwiN/gatus#1462)
- fix(client): Switch websocket library by [@&#8203;joy4eg](https://github.com/joy4eg) in [#&#8203;1423](TwiN/gatus#1423)
- fix(ui): Inconsistent time values in UI by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1452](TwiN/gatus#1452)
- chore(ui): Remove unnecessary eslint rule disables by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1422](TwiN/gatus#1422)
- ui: Disable hover effect if no link is set by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1419](TwiN/gatus#1419)
- ci: Add workflow to regenerate static assets by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1457](TwiN/gatus#1457)
- ci: Add platform input for custom action workflow by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1437](TwiN/gatus#1437)
- docs(alerting): Remove warning for Splunk alerting provider by [@&#8203;luketainton](https://github.com/luketainton) in [#&#8203;1475](TwiN/gatus#1475)
- docs: Separate web and ui config into sections by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1439](TwiN/gatus#1439)
- docs: Add missing alert provider group override options by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1467](TwiN/gatus#1467)
- docs: Update Telegram User ID to Chat ID in README by [@&#8203;gshpychka](https://github.com/gshpychka) in [#&#8203;1434](TwiN/gatus#1434)
- docs: Update config section and add env var faq by [@&#8203;PythonGermany](https://github.com/PythonGermany) in [#&#8203;1450](TwiN/gatus#1450)

#### New Contributors

- [@&#8203;gshpychka](https://github.com/gshpychka) made their first contribution in [#&#8203;1434](TwiN/gatus#1434)
- [@&#8203;TheBinaryGuy](https://github.com/TheBinaryGuy) made their first contribution in [#&#8203;1462](TwiN/gatus#1462)
- [@&#8203;luketainton](https://github.com/luketainton) made their first contribution in [#&#8203;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>
@TwiN
Copy link
Owner

TwiN commented Jan 8, 2026

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 :)

@PythonGermany PythonGermany deleted the add-workflow-to-regenerate-static-assets branch January 9, 2026 17:24
@PythonGermany
Copy link
Contributor Author

PythonGermany commented Jan 9, 2026

add a comment to the PR if no changes are detected

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.

also add the workflow status to the PR as it seems to just be running with no status indication

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.

@TwiN
Copy link
Owner

TwiN commented Jan 10, 2026

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

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks

Those status checks:
181090394-ecee2bc6-c142-41a8-a450-094b9be79fd9.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(ui): Add GitHub workflow to regenerate static assets

2 participants