ci: run the checks on pull requests alone #279

Merged
claudiomaradonna merged 1 commit from ci/checks-on-pr into main 2026-12-03 16:02:56 +01:00
Collaborator

Why

The Maintenance workflow ran its checks twice for each merge: on the
pull request, then again on the push to main, where publish waited
for them 11 to 13 minutes before updating the plugin marketplaces.
Merges fast-forward, so the push carries the commit the pull request's
run already checked.

What changed

The job checks now runs on pull requests to main alone, and
publish runs on each push to main at once, without needs: checks.
Before, both events ran the checks and publish followed them.

main stays checked only while the forge protects it.
docs/MAINTENANCE.md now says which protection to set: block direct
pushes, require the status of the Maintenance workflow's checks job,
and require a pull request up to date with main. Set these on the
forge if they are not set yet.

How to verify

On branch tip 53632ec:

grep -n "needs:\|if:" .forgejo/workflows/maintenance.yml

prints checks's if: github.event_name == 'pull_request' and
publish's if: github.event_name == 'push' && github.ref == 'refs/heads/main', and no needs:; on base b058b0e it also prints
needs: checks and no condition on checks. Run as written.

On the forge, this pull request's run should show checks running and
publish skipped; after the merge, the push run should show checks
skipped and publish starting at once. Not yet observed.

The checks of docs/MAINTENANCE.md pass on the tip: 427 agent
configuration tests, the work-folder check tests, the shell check,
Prettier on the docs and the workflow, the static validator, and
git diff --check main.

Considerations

Without the protection of main, a direct push publishes unchecked
builds. The protection cannot be read or set from this change.

## Why The Maintenance workflow ran its checks twice for each merge: on the pull request, then again on the push to `main`, where `publish` waited for them 11 to 13 minutes before updating the plugin marketplaces. Merges fast-forward, so the push carries the commit the pull request's run already checked. ## What changed The job `checks` now runs on pull requests to `main` alone, and `publish` runs on each push to `main` at once, without `needs: checks`. Before, both events ran the checks and `publish` followed them. `main` stays checked only while the forge protects it. `docs/MAINTENANCE.md` now says which protection to set: block direct pushes, require the status of the Maintenance workflow's `checks` job, and require a pull request up to date with `main`. Set these on the forge if they are not set yet. ## How to verify On branch tip `53632ec`: ```bash grep -n "needs:\|if:" .forgejo/workflows/maintenance.yml ``` prints `checks`'s `if: github.event_name == 'pull_request'` and `publish`'s `if: github.event_name == 'push' && github.ref == 'refs/heads/main'`, and no `needs:`; on base `b058b0e` it also prints `needs: checks` and no condition on `checks`. Run as written. On the forge, this pull request's run should show `checks` running and `publish` skipped; after the merge, the push run should show `checks` skipped and `publish` starting at once. Not yet observed. The checks of `docs/MAINTENANCE.md` pass on the tip: 427 agent configuration tests, the work-folder check tests, the shell check, Prettier on the docs and the workflow, the static validator, and `git diff --check main`. ## Considerations Without the protection of `main`, a direct push publishes unchecked builds. The protection cannot be read or set from this change.
ci: run the checks on pull requests alone
All checks were successful
Maintenance / checks (pull_request) Successful in 7m48s
Maintenance / publish (pull_request) Has been skipped
Maintenance / checks (push) Has been skipped
Maintenance / publish (push) Successful in 53s
53632ec7aa
Merges fast-forward, so a push to main carries the commit its pull
request's run already checked; running the checks again held each
publish back by 11 to 13 minutes. main's protection on the forge now
keeps unchecked commits out.
claudiomaradonna deleted branch ci/checks-on-pr 2026-12-03 16:03:15 +01:00
First-time contributor

Command failed

The agent did not complete this command, so nothing came of it. A person should look at this thread.

The run failed at step "aoe_purge". The operator reads the job logs in the Windmill editor, or finds the run with: wmill job list --path f/agents/bot_commands

## Command failed The agent did not complete this command, so nothing came of it. A person should look at this thread. The run failed at step "aoe_purge". The operator reads the job logs in the Windmill editor, or finds the run with: `wmill job list --path f/agents/bot_commands`
Sign in to join this conversation.
No description provided.