Skip to content

Auto-build seerr latest release with PR #1855 (hide requested media)#1

Merged
danieldjupvik merged 6 commits into
mainfrom
add-build-pipeline
Jul 6, 2026
Merged

Auto-build seerr latest release with PR #1855 (hide requested media)#1
danieldjupvik merged 6 commits into
mainfrom
add-build-pipeline

Conversation

@danieldjupvik

@danieldjupvik danieldjupvik commented Jul 6, 2026

Copy link
Copy Markdown
Owner

What this is

A daily GitHub Actions pipeline that publishes ghcr.io/danieldjupvik/seerr:latest — the latest official seerr release with upstream PR #1855 (hide already requested media) applied. Drop-in replacement for ghcr.io/seerr-team/seerr:latest on Unraid. The image name is derived from the repo (ghcr.io/${{ github.repository }}), so future renames just work, and additional patches can be added later as extra diff-apply steps.

How it behaves

  • Daily at 05:23 UTC (plus manual trigger with an optional force rebuild flag).
  • No-op in seconds when there's no new upstream release (.last-built marker; occasional keepalive commit prevents GitHub auto-disabling the schedule after 60 idle days).
  • New release → clone upstream at the release tag, apply the PR diff fetched fresh from the GitHub API, verify it applies, build with upstream's own Dockerfile, push :latest + :vX.Y.Z-pr1855 to GHCR.
  • PR #1855 merged or closed upstream → opens an issue in this repo with switch-back instructions, disables the workflow, and fails the run. This is the requested loud signal to move back to the official image.
  • Patch conflicts with a new release → opens an issue and fails without publishing anything; the previous image keeps working.

Safety notes

  • Builds from pristine upstream source at the release tag + the PR diff — no fork, nothing to sync.
  • Upstream-controlled values (release tag) are format-validated and passed to shell via env, not inline interpolation.
  • Uses only the repo-scoped GITHUB_TOKEN (no PATs, no secrets to manage).
  • linux/amd64 only (Unraid).

After merging

  1. Actions → build → Run workflow (or wait for the next 05:23 UTC run) — first build takes ~15–30 min.
  2. Make the GHCR package public: Profile → Packages → seerr → Package settings → Change visibility → Public (one time; lets Unraid pull without credentials).
  3. In Unraid, change the seerr container Repository to ghcr.io/danieldjupvik/seerr:latest.
  4. In seerr Settings → General, enable Hide Requested Media.

Verified before opening this PR: the PR #1855 diff applies cleanly to both current develop and the v3.3.0 release tag.

@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@danieldjupvik, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 34 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0777c6bd-c97b-440d-86e4-c91d77f35813

📥 Commits

Reviewing files that changed from the base of the PR and between 57293ef and 9f6438e.

📒 Files selected for processing (5)
  • .github/workflows/build.yml
  • README.md
  • patches/README.md
  • patches/pr1855.diff
  • patches/pr1855.fixups.diff

Walkthrough

Adds a new GitHub Actions workflow that automatically rebuilds and publishes a Docker image applying a specific upstream pull request diff onto new upstream releases, tracks build state via a .last-built file, and updates the README with documentation of the process, image usage, and failure modes.

Changes

Automated PR-tracking build workflow

Layer / File(s) Summary
Workflow config and PR state gate
.github/workflows/build.yml
Defines triggers, permissions, concurrency, and env vars; queries the upstream PR's merge/close status and disables the workflow with a notification issue when merged or closed.
Release detection and keepalive
.github/workflows/build.yml
Compares the latest upstream release tag against .last-built to decide whether to build, and performs an empty keepalive commit if no build is needed and the repo is stale.
Patch, build, and push image
.github/workflows/build.yml
Clones upstream at the release tag, applies the PR diff (failing with an issue on conflict), then builds and pushes a multi-arch Docker image to GHCR with latest and PR-tagged variants.
Record build state
.github/workflows/build.yml, .last-built
Writes the built tag back to .last-built and commits it, with the file initialized to none.
README documentation
README.md
Documents the replacement GHCR image, tagging/pinning, workflow mechanics, one-time GHCR visibility setup, manual rebuild steps, and failure modes table.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
    participant Scheduler as GitHub Actions Scheduler
    participant Workflow as build.yml Workflow
    participant UpstreamAPI as Upstream GitHub API
    participant GitRepo as Workflow Repo (.last-built)
    participant GHCR as GHCR Registry

    Scheduler->>Workflow: Trigger scheduled/manual run
    Workflow->>UpstreamAPI: Check upstream PR merge/close status
    alt PR merged or closed
        Workflow->>UpstreamAPI: Create notification issue
        Workflow->>Workflow: Disable workflow
    else PR open
        Workflow->>UpstreamAPI: Fetch latest release tag
        Workflow->>GitRepo: Compare tag against .last-built
        alt New release detected
            Workflow->>UpstreamAPI: Clone upstream at release tag
            Workflow->>UpstreamAPI: Fetch PR diff
            alt Diff applies cleanly
                Workflow->>GHCR: Build and push Docker image
                Workflow->>GitRepo: Update .last-built and commit
            else Diff conflict
                Workflow->>UpstreamAPI: Create conflict issue
            end
        else No new release
            Workflow->>GitRepo: Perform keepalive commit if stale
        end
    end
Loading

Poem

A rabbit watched a PR each day,
hopping tags along the way. 🐇
Patch it, build it, push it through,
`.last-built` remembers what we knew.
If merged or closed, I'll rest my paws—
till then, I build without a pause! 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: automatically building seerr latest releases with PR #1855 applied.
Description check ✅ Passed The description is directly related and accurately explains the automated build pipeline and its behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-build-pipeline
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch add-build-pipeline

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/build.yml (1)

97-149: 🔒 Security & Privacy | 🔵 Trivial

Supply-chain consideration: the live PR diff is fetched and auto-published to :latest with no human review.

Each run pulls the current state of PR #1855 (Line 108) and, on any new upstream release, builds and pushes it to ${IMAGE}:latest — which Unraid consumes directly. If the PR head is force-pushed with malicious changes (compromised author account or a hijacked fork), the next scheduled run silently builds and ships that code to your production image.

The tag-format validation (Lines 72-75) guards against branch/tag injection, but nothing pins the contents of the patch. Consider one of:

  • Pin to a reviewed PR head SHA (fetch the diff for a known-good commit) and bump it deliberately, or
  • Gate publication of :latest behind a manual approval/notification while still auto-tracking releases.

This is inherent to the auto-tracking design, so it may be an accepted trade-off — flagging it so the risk is explicit.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/build.yml around lines 97 - 149, The workflow auto-fetches
the live PR diff and publishes it directly to ${IMAGE}:latest, which creates an
unreviewed supply-chain risk. Update the release flow in build.yml around the
Fetch upstream source at release tag, Apply PR 1855 diff, and Build and push
image steps to either pin the patch to a reviewed PR head SHA or require a
manual approval gate before pushing :latest, while still allowing release
tracking if desired.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Around line 9-11: The fenced image snippet in the README is a bare code fence,
which markdownlint flags. Update the fenced block around the image reference to
use an explicit text language label, using the existing README snippet as the
target so the fence is recognized without implying code.

---

Nitpick comments:
In @.github/workflows/build.yml:
- Around line 97-149: The workflow auto-fetches the live PR diff and publishes
it directly to ${IMAGE}:latest, which creates an unreviewed supply-chain risk.
Update the release flow in build.yml around the Fetch upstream source at release
tag, Apply PR 1855 diff, and Build and push image steps to either pin the patch
to a reviewed PR head SHA or require a manual approval gate before pushing
:latest, while still allowing release tracking if desired.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cd1ea408-8f6d-4ee2-a245-d740114a3b3e

📥 Commits

Reviewing files that changed from the base of the PR and between a43c3e2 and 57293ef.

📒 Files selected for processing (3)
  • .github/workflows/build.yml
  • .last-built
  • README.md

Comment thread README.md
Addresses CodeRabbit supply-chain finding: the build no longer fetches
the PR diff from the network. The reviewed diff (pinned at PR head
cfeeb8ce) is committed under patches/ and can only change via a
reviewed commit in this repo.
…ions

Also labels the bare code fence as text (markdownlint MD040).
Two review findings on the vendored PR code, fixed in a separate fixup
patch so pr1855.diff stays verbatim upstream:

- getRelatedMedia join now excludes DECLINED and COMPLETED requests, so
  a declined title reappears in Discover instead of being hidden forever
- the join selects only request id and status instead of serializing
  full MediaRequest rows into every related-media response

Validated: both patches apply cleanly to v3.3.0 in sequence, and server
+ client typecheck passes on the fully patched tree.
@danieldjupvik
danieldjupvik merged commit 26dfd49 into main Jul 6, 2026
1 check passed
@danieldjupvik
danieldjupvik deleted the add-build-pipeline branch July 6, 2026 22:58
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