Skip to content

Comment PR test-build rebase command on each PR#8

Merged
Mondrethos merged 2 commits into
mainfrom
feat/pr-rebase-hint
Jun 18, 2026
Merged

Comment PR test-build rebase command on each PR#8
Mondrethos merged 2 commits into
mainfrom
feat/pr-rebase-hint

Conversation

@Mondrethos

Copy link
Copy Markdown
Owner

Summary

Adds .github/workflows/pr-rebase-hint.yml — posts a comment when a PR is opened with the exact rebase command for that PR's signed test image:

rpm-ostree rebase ostree-image-signed:docker://ghcr.io/<owner>/monolith:pr-<number>-<image-version>

Details

  • Signed ref. Same-repo PR builds have SIGNING_SECRET, so their images are cosign-signed (verified pr-7-44 against cosign.pub). The comment uses ostree-image-signed:, matching the README; anyone testing is already on monolith and has the policy installed.
  • Version from the recipe. image-version is read from recipes/recipe.yml (currently 44) so the tag stays correct across Fedora bumps.
  • One comment. The pr-N-<version> tag is constant for the PR's lifetime, so it posts once on opened/reopened instead of on every push.
  • Least privilege. Top-level permissions: {}; the job takes only contents: read and pull-requests: write.

Scope

Targets the current same-repo PR flow. Fork PRs (read-only token, unsigned image) are intentionally out of scope until outside contributions start.

Self-demo

This PR should get the comment on itself once the workflow runs.

Adds a workflow that posts a one-time comment when a PR is opened with the
signed rebase command for that PR's test image (pr-<number>-<image-version>).
The image-version is read from the recipe so it survives Fedora bumps, and
the tag is constant for the PR's lifetime so a single comment suffices.
@github-actions

Copy link
Copy Markdown

🧪 Test this PR on a real install

Each successful build of this PR publishes a signed test image to ghcr.io/mondrethos/monolith:pr-8-44. From an existing monolith install (which already has the signing policy), rebase onto it:

rpm-ostree rebase ostree-image-signed:docker://ghcr.io/mondrethos/monolith:pr-8-44
systemctl reboot

The tag is rebuilt on every new commit here, so rpm-ostree upgrade pulls the latest build. When you're done testing, return to the released image:

rpm-ostree rebase ostree-image-signed:docker://ghcr.io/mondrethos/monolith:latest

The test tag stops updating once this PR is merged or closed.

The comment posts when the PR opens, before the build has published the
image. Phrase it so the reader waits for the green build check first,
avoiding a manifest-not-found if the command is run too early.
@Mondrethos Mondrethos merged commit 0d8597b into main Jun 18, 2026
2 checks passed
@Mondrethos Mondrethos deleted the feat/pr-rebase-hint branch June 18, 2026 09:03
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