Skip to content

ci(internal-workflows): add monthly release-sweep for release-please PRs - #900

Merged
ppat merged 1 commit into
mainfrom
feat/release-sweep-schedule
Sep 1, 2026
Merged

ppat merged 1 commit into
mainfrom
feat/release-sweep-schedule

Conversation

@homelab-agent-bot

@homelab-agent-bot homelab-agent-bot Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds .github/workflows/release-sweep.yaml, a scheduled workflow that evaluates this repo's open release-please pull request on the 15th of every month and merges it automatically when it is safe to do so — a non-breaking patch/minor bump, no hold label, no merge conflicts, and every check green. It reuses ppat/homelab-ops-actions's release-sweep composite action, pinned to its current tagged release v2.3.2.

Why

This repo's release-please PR otherwise sits until someone manually clicks merge; a monthly sweep clears the routine, eligible ones without waiting on a human, while still holding back anything breaking or already flagged.

Scope and type, per this repo's new commit taxonomy (#899)

Scoped internal-workflows (rule 5: .github/workflows/** is this repo's own machinery), not github-actions — that scope is reserved for a diff that only moves an existing uses: ref, and this adds a new workflow. Typed ci, not feat: the pairing rule reserves feat/fix/perf/refactor/revert for the image/template/empty scopes that force a release of this repo's two deliverables, and release-sweep merges release-please's own PR without shipping the image or the template itself.

How it's wired

  • Two triggers: schedule (17 3 15 * *, monthly on the 15th) runs live; pull_request scoped to this workflow file runs the same action in dry_run mode for visibility whenever the workflow itself changes — it never merges anything.
  • Token: the schedule trigger mints a GitHub App token via actions/create-github-app-token, using HOMELAB_BOT_APP_ID/HOMELAB_BOT_APP_PRIVATE_KEY — the same App identity release.yaml already uses to run release-please itself — scoped to contents:write and pull-requests:write. The pull_request trigger uses the default read-only github.token instead, since it only dry-runs. The workflow's own permissions: block stays read-only either way; write access comes solely from the minted token.
  • fetch-depth: 0: unlike every other workflow in this repo (which use the default fetch-depth: 1), this one needs full history — release-sweep's staleness guard compares the release PR's parent commit against origin/main, which isn't possible with a shallow clone.

Test plan

  • pre-commit run --all-files (yamllint, commitlint) passes locally.
  • actionlint passes locally.
  • The pull_request dry-run trigger fires on this PR and reports what it would (not) merge — check its job output before merging.
  • First live schedule run on 2026-10-15 confirms the merge path end-to-end (or sooner via manual inspection, since there's no workflow_dispatch trigger — omitted deliberately to keep the token/dry-run branching unambiguous, matching the source action's own dogfood workflow).

Adds a scheduled workflow that runs ppat/homelab-ops-actions's
release-sweep composite action (pinned to v2.3.2) on the 15th of each
month, merging this repo's open release-please pull request once it is
a non-breaking patch/minor bump with no hold label, no conflicts, and
all checks green. A pull_request trigger scoped to the workflow file
itself exercises the same action in dry-run mode for visibility when
the workflow is edited, without merging anything.

Scoped internal-workflows (rule 5: .github/workflows/** is this
repo's own machinery) rather than github-actions, since this adds a
new workflow rather than only moving an existing uses: ref. Typed ci
rather than feat because the pairing rule reserves feat/fix/perf/
refactor/revert for the image/template/empty scopes that force a
release of this repo's two deliverables — release-sweep only merges
release-please's own PR and ships neither the image nor the template
itself.

The live monthly run authenticates with a freshly minted GitHub App
token (HOMELAB_BOT_APP_ID/HOMELAB_BOT_APP_PRIVATE_KEY) scoped to
contents:write and pull-requests:write — the same identity this repo's
release.yaml already uses to run release-please itself. The workflow's
own permissions stay read-only; only the App token carries write
access, and only on the schedule trigger.

The checkout step uses fetch-depth: 0 rather than this repo's usual
fetch-depth: 1, because release-sweep's staleness guard compares the
release PR's parent commit against origin/main and needs full history
to do it.
@homelab-agent-bot
homelab-agent-bot Bot force-pushed the feat/release-sweep-schedule branch from dbe40a2 to a6afc59 Compare September 1, 2026 17:12
@homelab-agent-bot homelab-agent-bot Bot changed the title feat(github-actions): auto-merge safe release-please PRs monthly ci(internal-workflows): add monthly release-sweep for release-please PRs Sep 1, 2026
@ppat
ppat merged commit b55e42f into main Sep 1, 2026
21 of 27 checks passed
@ppat
ppat deleted the feat/release-sweep-schedule branch September 1, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant