Skip to content

Fix CI image push by resolving env var conflict with Makefile#43

Merged
alicefr merged 1 commit into
mainfrom
fix-ci
Jun 3, 2026
Merged

Fix CI image push by resolving env var conflict with Makefile#43
alicefr merged 1 commit into
mainfrom
fix-ci

Conversation

@alicefr

@alicefr alicefr commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

The workflow's REGISTRY env var was overriding the Makefile's REGISTRY ?= default, causing images to be built with wrong names. Rename workflow env vars to PUSH_REGISTRY/PUSH_IMAGE, query the Makefile for actual built image names, and rename bink-node to node.

Summary by Sourcery

Resolve container image naming and registry conflicts between the CI workflow and the Fedora node image Makefile.

Bug Fixes:

  • Prevent CI from overriding the Makefile's REGISTRY default so images are pushed to the correct registry and repository.

Enhancements:

  • Align image names from bink-node to node across the Makefile and workflow, and query the Makefile for final image references before tagging and pushing.

The workflow's REGISTRY env var was overriding the Makefile's
REGISTRY ?= default, causing images to be built with wrong names.
Rename workflow env vars to PUSH_REGISTRY/PUSH_IMAGE, query the
Makefile for actual built image names, and rename bink-node to node.

Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sourcery-ai

sourcery-ai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Reviewer's Guide

Updates the node image build workflow to avoid clobbering the Makefile’s REGISTRY defaults, align image names with the Makefile (renaming bink-node to node), and drive push tagging from Makefile-provided image names instead of hard-coded localhost/bink-node references.

Sequence diagram for updated node image build and push workflow

sequenceDiagram
    actor Developer
    participant GitHubActions
    participant FedoraMakefile
    participant ghcr_io

    Developer->>GitHubActions: push node change
    GitHubActions->>GitHubActions: set PUSH_REGISTRY, PUSH_IMAGE

    GitHubActions->>FedoraMakefile: make print-bootc-image
    FedoraMakefile-->>GitHubActions: BOOTC_IMAGE

    GitHubActions->>FedoraMakefile: make print-node-image
    FedoraMakefile-->>GitHubActions: NODE_IMAGE

    GitHubActions->>ghcr_io: podman login ghcr.io

    GitHubActions->>ghcr_io: podman tag BOOTC_IMAGE PUSH_REGISTRY/PUSH_IMAGE:TAG
    GitHubActions->>ghcr_io: podman push PUSH_REGISTRY/PUSH_IMAGE:TAG
    GitHubActions->>ghcr_io: podman tag BOOTC_IMAGE PUSH_REGISTRY/PUSH_IMAGE:latest
    GitHubActions->>ghcr_io: podman push PUSH_REGISTRY/PUSH_IMAGE:latest

    GitHubActions->>ghcr_io: podman tag NODE_IMAGE PUSH_REGISTRY/PUSH_IMAGE:TAG-disk
    GitHubActions->>ghcr_io: podman push PUSH_REGISTRY/PUSH_IMAGE:TAG-disk
    GitHubActions->>ghcr_io: podman tag NODE_IMAGE PUSH_REGISTRY/PUSH_IMAGE:latest-disk
    GitHubActions->>ghcr_io: podman push PUSH_REGISTRY/PUSH_IMAGE:latest-disk
Loading

File-Level Changes

Change Details Files
Decouple workflow registry/image env vars from Makefile defaults and adjust login target.
  • Rename workflow environment variables from REGISTRY/IMAGE_NAME to PUSH_REGISTRY/PUSH_IMAGE so they no longer override the Makefile’s REGISTRY-derived image names.
  • Change the podman login target to use the fixed ghcr.io registry instead of a REGISTRY env variable that conflicted with Makefile defaults.
.github/workflows/build-node-image.yaml
Drive tagging/pushing from Makefile-reported image names instead of hardcoded localhost/bink-node tags.
  • Set working directory for the Tag and push step to node-images/fedora so Makefile commands can be invoked.
  • Introduce TAG, BOOTC_SRC, DISK_SRC, and PUSH_DEST shell variables to capture the computed image tag, Makefile-derived image names, and push destination registry/image.
  • Replace podman tag/push commands that referenced localhost/bink-node and REGISTRY/IMAGE_NAME with equivalents that tag/push from BOOTC_SRC/DISK_SRC to PUSH_DEST using TAG and latest variants.
.github/workflows/build-node-image.yaml
node-images/fedora/Makefile
Align Makefile image names with new node image naming and expose them via print targets.
  • Change BOOTC_IMAGE and NODE_IMAGE defaults in the Makefile from $(REGISTRY)/bink-node to $(REGISTRY)/node for both bootc and disk images.
  • Add print-bootc-image and print-node-image Makefile targets that echo BOOTC_IMAGE and NODE_IMAGE so the workflow can query the actual built image names.
node-images/fedora/Makefile

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai 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.

Hey - I've left some high level feedback:

  • The PUSH_REGISTRY env var in the workflow actually includes both registry and repository (ghcr.io/alicefr/bink), which is a bit misleading; consider splitting this into separate PUSH_REGISTRY and PUSH_REPOSITORY (or similar) for clarity and to avoid confusion with REGISTRY in the Makefile.
  • The registry/repository string is now duplicated between the workflow (PUSH_REGISTRY) and the Makefile (REGISTRY default); consider adding a small Makefile target to print the fully qualified image repo and let the workflow read it, so there is a single source of truth for image location.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The `PUSH_REGISTRY` env var in the workflow actually includes both registry and repository (`ghcr.io/alicefr/bink`), which is a bit misleading; consider splitting this into separate `PUSH_REGISTRY` and `PUSH_REPOSITORY` (or similar) for clarity and to avoid confusion with `REGISTRY` in the Makefile.
- The registry/repository string is now duplicated between the workflow (`PUSH_REGISTRY`) and the Makefile (`REGISTRY` default); consider adding a small Makefile target to print the fully qualified image repo and let the workflow read it, so there is a single source of truth for image location.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@alicefr alicefr merged commit b08d216 into main Jun 3, 2026
6 checks passed
@alicefr alicefr deleted the fix-ci branch June 18, 2026 10:20
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