Skip to content

major changes in containers deployment. - #9

Merged
ypriverol merged 30 commits into
mainfrom
dev
Apr 22, 2026
Merged

ypriverol merged 30 commits into
mainfrom
dev

Conversation

@ypriverol

@ypriverol ypriverol commented Apr 9, 2026 •

Copy link
Copy Markdown
Contributor

This pull request updates the GitHub Actions workflow for building and publishing Docker and Singularity images, focusing on improved maintainability, flexibility, and security. The main changes include parameterizing image names and registry details, updating authentication methods, refining job conditions, and enhancing the build and notification steps.

Container Image Parameterization and Flexibility:

  • Introduced environment variables (REGISTRY, IMAGE_NAME, SINGULARITY_IMAGE_NAME) to make image naming and registry usage more flexible and reusable across jobs.
  • Updated all image references in the build matrices to use ${{ github.repository_owner }} instead of hardcoded values, enabling workflows to work for forks and other organizations.

Build and Push Improvements:

  • Enhanced the build-diann job with improved naming, retry logic, metadata extraction, and tagging strategies (including date-based tags). [1] [2]
  • Added explicit steps for pulling, saving, converting, and pushing Docker images to Singularity, and included notifications for build success or failure.

Authentication and Security Updates:

  • Standardized authentication to use ${{ github.repository_owner }} as the username and ${{ secrets.GITHUB_TOKEN }} for password, replacing previous usage of ${{ github.actor }} and custom tokens. This improves security and consistency across jobs. [1] [2] [3] [4]

Conditional Execution and Permissions:

  • Added conditions to restrict certain jobs (e.g., build-relink, sync-openms) to only run for the bigbio organization, preventing accidental pushes from forks or other users. [1] [2]

Workflow Usability and Clarity:

  • Improved job and step naming for better clarity in the Actions UI.
  • Added explicit notifications for build outcomes, making it easier to monitor workflow results.

These changes collectively make the workflow more robust, secure, and easier to maintain.

Summary by CodeRabbit

  • Chores

    • Updated CI workflow for container builds: registry image names now use the repository owner, authentication moved to a repository-aware token, improved Singularity build/save/push flow, and added explicit success/failure notifications.
    • Restricted specific image build jobs to run only for the repository owner.
  • Documentation

    • Added README guidance on forking to access private container images and updating image tags to your repository owner.

@coderabbitai

coderabbitai Bot commented Apr 9, 2026 •

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Replaces hardcoded GHCR owner with repository-owner-scoped registry, centralizes env.REGISTRY, switches GHCR auth to secrets.GITHUB_TOKEN, replaces inline Singularity setup with eWaterCycle/setup-singularity@v7, refactors Docker→Singularity→ORAS push flow, adds notifications, and documents forking/registry access in README.

Changes

Cohort / File(s) Summary
CI workflow
.github/workflows/quantms-containers.yml
Added top-level env.REGISTRY: ghcr.io, replaced ghcr.io/bigbio/... with ghcr.io/${{ github.repository_owner }}/..., switched auth from secrets.GHCR_TOKEN to secrets.GITHUB_TOKEN, introduced eWaterCycle/setup-singularity@v7, changed Docker save → .tar → singularity build → singularity remote login → oras push flow, renamed job/step labels, added success()/failure() notification steps, and gated build-relink/sync-openms on github.repository_owner == 'bigbio' plus existing conditions.
Documentation
README.md
Added "Fork repository to get access to private quantms containers" section explaining that workflow builds/pushes owner-scoped GHCR images, instructing forks/ownership replacement and GHCR package access configuration.

Sequence Diagram(s)

sequenceDiagram
participant Actions as GitHub Actions
participant Docker as Docker Engine
participant Singularity as Singularity CLI
participant GHCR as GHCR / ORAS

Actions->>Docker: build image(s) (matrix)
Docker->>Docker: docker save -> ${matrix}.tar
Actions->>Singularity: singularity build ${matrix}.sif from docker-archive://${matrix}.tar
Singularity->>GHCR: singularity remote login (GITHUB_TOKEN)
Singularity->>GHCR: oras push ${matrix}.sif to ghcr.io/${{ github.repository_owner }}
GHCR-->>Actions: push result
Actions->>Actions: run success()/failure() notification steps
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • ypriverol

Poem

🐰 I hopped through YAML lines so spry,

Swapped owner names beneath the sky,
Saved a tar, built a SIF with care,
Pushed with tokens through the midnight air,
CI carrots hum — containers in the sky!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'major changes in containers deployment' is vague and overly broad, using generic phrasing that does not convey specific information about the primary changes in the pull request. Replace with a more specific title that captures the main intent, such as 'Refactor container workflow to support forks and use GITHUB_TOKEN' or 'Make container deployment workflow owner-agnostic and improve security.'
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev

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 and usage tips.

@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: 4

🧹 Nitpick comments (2)
.github/workflows/quantms-containers.yml (2)

254-260: Hardcoded bigbio in Singularity push URIs.

While the job condition ensures this only runs for bigbio (line 214), the hardcoded URIs at lines 256 and 259 are inconsistent with the parameterized approach used in build-diann (lines 192, 197). Consider using ${{ github.repository_owner }} for consistency.

Suggested change
-          singularity push image.sif oras://ghcr.io/bigbio/${{ matrix.sif }}
+          singularity push image.sif oras://ghcr.io/${{ github.repository_owner }}/${{ matrix.sif }}
           if [[ "${{ github.event_name }}" == "release" && -n "${{ matrix.extra_tags }}" ]]; then
             SIF_LATEST=$(echo "${{ matrix.sif }}" | sed 's/:[^:]*$/:latest/')
-            singularity push image.sif oras://ghcr.io/bigbio/$SIF_LATEST
+            singularity push image.sif oras://ghcr.io/${{ github.repository_owner }}/$SIF_LATEST
           fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 254 - 260, The
Singularity push URIs are hardcoded to "bigbio" which breaks consistency with
the parameterized owner used elsewhere; update the two singularity push targets
that reference ghcr.io/bigbio/${{ matrix.sif }} and ghcr.io/bigbio/$SIF_LATEST
to use the repository owner variable (e.g., ghcr.io/${{ github.repository_owner
}}/${{ matrix.sif }} and ghcr.io/${{ github.repository_owner }}/$SIF_LATEST) so
they match the parameterized pattern used by build-diann and respect different
repo owners.

28-31: SINGULARITY_IMAGE_NAME environment variable is defined but never used.

The SINGULARITY_IMAGE_NAME env var is defined at line 31, but the Singularity push steps (lines 192, 197) use ${{ matrix.sif }} instead. Either use this env var consistently or remove it to avoid confusion.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 28 - 31, The
SINGULARITY_IMAGE_NAME env var is defined but not used; update the workflow to
either remove SINGULARITY_IMAGE_NAME or make the Singularity push steps use it
consistently by replacing occurrences of `${{ matrix.sif }}` with the
environment variable `${{ env.SINGULARITY_IMAGE_NAME }}` (or set `matrix.sif`
from that env var); locate references to SINGULARITY_IMAGE_NAME and the push
steps that reference `matrix.sif` to ensure a single source of truth and update
the push step arguments and any matrix definitions accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/quantms-containers.yml:
- Around line 138-149: The meta and date steps are producing outputs that are
never consumed; either remove the dead steps (ids meta and date) or wire their
outputs into the build step: expose docker/metadata-action outputs (e.g., use
steps.meta.outputs.tags or steps.meta.outputs.image) and the date step output
(steps.date.outputs.DATE_TAG) and replace matrix.tag / matrix.extra_tags in the
build-push-action invocation with the corresponding steps.meta.outputs.* and
steps.date.outputs.DATE_TAG references so the extracted tags are actually used.
- Around line 131-136: The Docker login in the build-diann job is using
github.actor while build-relink and sync-openms use github.repository_owner;
update the build-diann job's docker/login-action step (the "Log in to GitHub
Container Registry" step) to set username: ${{ github.repository_owner }} to
match the other jobs, or add a short comment in that step explaining why
github.actor must differ if there's an intentional reason—ensure consistency
across the jobs (build-diann, build-relink, sync-openms) by using
github.repository_owner unless a documented exception is required.
- Around line 121-123: RETRY_TIMES and RETRY_DELAY are defined but never used;
either remove these unused env vars or wire them into retry steps: update the
workflow to reference RETRY_TIMES and RETRY_DELAY when adding retry behavior
(for example by using the nick-fields/retry@v2 action like in the sync-openms
job) so that the retry action reads the environment variables (RETRY_TIMES,
RETRY_DELAY) to control attempts and delay, or simply delete RETRY_TIMES and
RETRY_DELAY from the env block if no retry logic is required.
- Line 155: Replace the current push condition so it only reads workflow inputs
for workflow_dispatch events and compares the input as a string; specifically,
change the push condition to check github.event_name == 'workflow_dispatch' &&
(github.event.inputs.push_images == 'true' || github.event.inputs.push_images ==
'') instead of the boolean comparison, and apply this same change to the other
push conditions referenced (the additional push: occurrences on the same
workflow). This ensures inputs are only evaluated for workflow_dispatch and uses
string comparisons for github.event.inputs.push_images.

---

Nitpick comments:
In @.github/workflows/quantms-containers.yml:
- Around line 254-260: The Singularity push URIs are hardcoded to "bigbio" which
breaks consistency with the parameterized owner used elsewhere; update the two
singularity push targets that reference ghcr.io/bigbio/${{ matrix.sif }} and
ghcr.io/bigbio/$SIF_LATEST to use the repository owner variable (e.g.,
ghcr.io/${{ github.repository_owner }}/${{ matrix.sif }} and ghcr.io/${{
github.repository_owner }}/$SIF_LATEST) so they match the parameterized pattern
used by build-diann and respect different repo owners.
- Around line 28-31: The SINGULARITY_IMAGE_NAME env var is defined but not used;
update the workflow to either remove SINGULARITY_IMAGE_NAME or make the
Singularity push steps use it consistently by replacing occurrences of `${{
matrix.sif }}` with the environment variable `${{ env.SINGULARITY_IMAGE_NAME }}`
(or set `matrix.sif` from that env var); locate references to
SINGULARITY_IMAGE_NAME and the push steps that reference `matrix.sif` to ensure
a single source of truth and update the push step arguments and any matrix
definitions accordingly.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: f2177863-7053-466d-846e-386c8f0057a0

📥 Commits

Reviewing files that changed from the base of the PR and between 4357944 and b16e4b1.

📒 Files selected for processing (1)
  • .github/workflows/quantms-containers.yml

@enryH

enryH commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator

So the login fails with your user as well. Before you used repository secrets, so maybe your GHCR setup is different?

now:

echo *** | singularity remote login -u ypriverol --password-stdin oras://ghcr.io

# Push with version tag
singularity push diann-2.3.2.sif oras://ghcr.io/bigbio/diann-sif:2.3.2

before:

export SINGULARITY_DOCKER_USERNAME=***
export SINGULARITY_DOCKER_PASSWORD=***
singularity push image.sif oras://ghcr.io/bigbio/diann-sif:2.3.2

@ypriverol

Copy link
Copy Markdown
Contributor Author

What is the difference with the current main branch; the login and push works with the current approach; better to do not changed it; I have tried other approaches in the past that didn't work.

- Fix critical bug: push condition used broken input comparison that
  would push images on pull_request events. Restored safe guard:
  github.event_name != 'pull_request' (build always, push only on merge)
- Remove dead code: unused metadata-action step, date tag step,
  RETRY_TIMES/RETRY_DELAY env vars, and IMAGE_NAME/SINGULARITY_IMAGE_NAME
- Standardize Docker login to use github.repository_owner across all jobs
- Standardize Singularity install (eWaterCycle/setup-singularity@v7) and
  auth (singularity remote login --password-stdin) across all jobs,
  replacing fragile apt-get || true and env-var-based auth
- Replace all hardcoded bigbio refs in push URIs with github.repository_owner
- Remove redundant docker pull (image already loaded via load: true)

https://claude.ai/code/session_01UFH8ge5154Z8q4DCEbQCTX
@enryH

enryH commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

What is the difference with the current main branch; the login and push works with the current approach; better to do not changed it; I have tried other approaches in the past that didn't work.

I think there is a way to use Personal Access Tokens which are set based on the user's repository permission. I had to do nothing to be able to push images to our ghcr.

https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-in-a-github-actions-workflow

claude and others added 2 commits April 10, 2026 07:01
secrets.GITHUB_TOKEN is scoped to the workflow actor, so the login
username must match. Using github.repository_owner causes 401 errors
when the actor differs from the owner (e.g. collaborators, bots).

Applies to all 3 Docker logins and all 3 Singularity logins.

https://claude.ai/code/session_01UFH8ge5154Z8q4DCEbQCTX
Refactor container workflows to use dynamic registry and repository owner
@ypriverol
ypriverol requested a review from enryH April 10, 2026 09:01
@Skitionek

Copy link
Copy Markdown
Contributor

Here is probably why things didn't work as expected in this reppo: singularityhub/github-ci#6

@ypriverol

Copy link
Copy Markdown
Contributor Author

@enryH @Skitionek everything looks OK now. Can you review the current PR for me to merge.

@enryH

enryH commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

@enryH @Skitionek everything looks OK now. Can you review the current PR for me to merge.

it looks good because you changed the condition again. So we will only see if the steps work after merging:
https://github.com/bigbio/quantms-containers/actions/runs/24232765139/job/70747974897 (see which steps are skipped due to the changed if statement again).

@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

♻️ Duplicate comments (4)
.github/workflows/quantms-containers.yml (4)

237-243: ⚠️ Potential issue | 🟠 Major

Same Singularity authentication concerns apply here.

Apply the environment variable approach (SINGULARITY_DOCKER_USERNAME, SINGULARITY_DOCKER_PASSWORD) for consistency and security.

🔒 Recommended fix
      - name: Convert to Singularity and push
        if: github.event_name != 'pull_request'
+       env:
+         SINGULARITY_DOCKER_USERNAME: ${{ github.actor }}
+         SINGULARITY_DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
        run: |
          docker save ${{ matrix.tag }} -o image.tar
          singularity build image.sif docker-archive://image.tar

-         echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io
-
          singularity push image.sif oras://ghcr.io/${{ github.repository_owner }}/${{ matrix.sif }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 237 - 243, Replace the
inline echo of the GitHub token and direct use of github.actor with
environment-backed credentials: set env variables SINGULARITY_DOCKER_USERNAME
and SINGULARITY_DOCKER_PASSWORD (mapped from repository secrets) at the job
level, then call singularity remote login using -u $SINGULARITY_DOCKER_USERNAME
and piping $SINGULARITY_DOCKER_PASSWORD (instead of echo ${{
secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }}
--password-stdin); keep the subsequent singularity push lines intact so pushes
to oras://ghcr.io/${{ github.repository_owner }}/${{ matrix.sif }} and the
conditional latest push still run. Ensure the new env variable names are used
consistently in the workflow and that secrets are referenced when defining those
env vars.

290-297: ⚠️ Potential issue | 🟠 Major

Same Singularity authentication concerns apply here.

Apply the environment variable approach for consistency.

🔒 Recommended fix
      - name: Sync OpenMS Singularity
+       env:
+         SINGULARITY_DOCKER_USERNAME: ${{ github.actor }}
+         SINGULARITY_DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
        run: |
-         echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io
-
          singularity pull --force openms.sif oras://ghcr.io/openms/openms-tools-thirdparty-sif:latest
          singularity push openms.sif oras://ghcr.io/${{ github.repository_owner }}/openms-tools-thirdparty-sif:${{ env.OPENMS_VERSION }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 290 - 297, The
Singularity authentication in the "Sync OpenMS Singularity" step currently
echoes the GitHub token directly; change it to use the environment variable
pattern used elsewhere by piping "${{ env.SINGULARITY_AUTH_TOKEN }}" into
singularity remote login (keep the existing flags: -u ${{ github.actor }}
--password-stdin) and ensure the job/workflow defines env.SINGULARITY_AUTH_TOKEN
= ${{ secrets.SINGULARITY_AUTH_TOKEN }} (or map from the existing secret you use
elsewhere) so authentication is consistent and secrets are not referenced
inline; update both singularity login usages in this step and any duplicate
blocks to use the same env variable.

164-176: ⚠️ Potential issue | 🟠 Major

Use environment variables for Singularity authentication instead of remote login.

As previously flagged: (1) echo ${{ secrets.GITHUB_TOKEN }} can leak secrets in debug logs; (2) singularity remote login stores credentials to disk, which is unsuitable for ephemeral CI. Use SINGULARITY_DOCKER_USERNAME and SINGULARITY_DOCKER_PASSWORD environment variables instead.

🔒 Recommended fix
      - name: Login and Deploy Container
-       if: ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }}
+       if: ${{ github.event_name != 'pull_request' && github.event.inputs.push_images != 'false' }}
+       env:
+         SINGULARITY_DOCKER_USERNAME: ${{ github.actor }}
+         SINGULARITY_DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
        run: |
-         echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io
-
          # Push with version tag
          singularity push ${{ matrix.context }}.sif oras://${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.sif }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 164 - 176, The current
job uses echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login which risks
leaking secrets to logs and writes credentials to disk; replace that flow by
exporting SINGULARITY_DOCKER_USERNAME and SINGULARITY_DOCKER_PASSWORD from
GitHub secrets (do not echo them) and run singularity push directly (e.g.,
export SINGULARITY_DOCKER_USERNAME="${{ secrets.SINGULARITY_DOCKER_USERNAME }}"
&& export SINGULARITY_DOCKER_PASSWORD="${{ secrets.SINGULARITY_DOCKER_PASSWORD
}}" && singularity push ${matrix.context}.sif oras://${{ env.REGISTRY }}/${{
github.repository_owner }}/${{ matrix.sif }}), and apply the same pattern for
the release/tag-latest branch that pushes $SIF_LATEST; remove the singularity
remote login call and ensure no secret is printed to stdout so credentials are
only provided via environment variables.

136-136: ⚠️ Potential issue | 🔴 Critical

Push condition will fail to push images on push and release events.

For push/release events, github.event.inputs is undefined, causing both comparisons to fail. This means Docker images will never be pushed for these event types—only for workflow_dispatch. Compare with build-relink (line 217) which correctly uses github.event_name != 'pull_request'.

🐛 Proposed fix
-          push: ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }}
+          push: ${{ github.event_name != 'pull_request' && github.event.inputs.push_images != 'false' }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml at line 136, The push condition
uses github.event.inputs which is undefined for push/release events so images
never get pushed; replace the current line starting with "push: ${{
(github.event.inputs.push_images..." with a condition that mirrors build-relink,
e.g. use "push: ${{ github.event_name != 'pull_request' }}" (or otherwise check
github.event_name != 'pull_request') so push/release events will allow image
pushes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/quantms-containers.yml:
- Around line 145-162: Update the three Singularity workflow steps ("Set up
Singularity", "Save Docker image for Singularity conversion", and "Convert
Docker image to Singularity") to use the corrected push condition
github.event_name != 'pull_request' && github.event.inputs.push_images !=
'false' instead of the current broken expression; keep the same actions (using
eWaterCycle/setup-singularity@v7, docker save of matrix.tag to
matrix.context.tar, and singularity build docker-archive://matrix.context.tar to
produce matrix.context.sif) but change their if: expressions so Singularity
conversion runs on push/release and only skips when inputs.push_images is
explicitly 'false'.

---

Duplicate comments:
In @.github/workflows/quantms-containers.yml:
- Around line 237-243: Replace the inline echo of the GitHub token and direct
use of github.actor with environment-backed credentials: set env variables
SINGULARITY_DOCKER_USERNAME and SINGULARITY_DOCKER_PASSWORD (mapped from
repository secrets) at the job level, then call singularity remote login using
-u $SINGULARITY_DOCKER_USERNAME and piping $SINGULARITY_DOCKER_PASSWORD (instead
of echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{
github.actor }} --password-stdin); keep the subsequent singularity push lines
intact so pushes to oras://ghcr.io/${{ github.repository_owner }}/${{ matrix.sif
}} and the conditional latest push still run. Ensure the new env variable names
are used consistently in the workflow and that secrets are referenced when
defining those env vars.
- Around line 290-297: The Singularity authentication in the "Sync OpenMS
Singularity" step currently echoes the GitHub token directly; change it to use
the environment variable pattern used elsewhere by piping "${{
env.SINGULARITY_AUTH_TOKEN }}" into singularity remote login (keep the existing
flags: -u ${{ github.actor }} --password-stdin) and ensure the job/workflow
defines env.SINGULARITY_AUTH_TOKEN = ${{ secrets.SINGULARITY_AUTH_TOKEN }} (or
map from the existing secret you use elsewhere) so authentication is consistent
and secrets are not referenced inline; update both singularity login usages in
this step and any duplicate blocks to use the same env variable.
- Around line 164-176: The current job uses echo ${{ secrets.GITHUB_TOKEN }} |
singularity remote login which risks leaking secrets to logs and writes
credentials to disk; replace that flow by exporting SINGULARITY_DOCKER_USERNAME
and SINGULARITY_DOCKER_PASSWORD from GitHub secrets (do not echo them) and run
singularity push directly (e.g., export SINGULARITY_DOCKER_USERNAME="${{
secrets.SINGULARITY_DOCKER_USERNAME }}" && export
SINGULARITY_DOCKER_PASSWORD="${{ secrets.SINGULARITY_DOCKER_PASSWORD }}" &&
singularity push ${matrix.context}.sif oras://${{ env.REGISTRY }}/${{
github.repository_owner }}/${{ matrix.sif }}), and apply the same pattern for
the release/tag-latest branch that pushes $SIF_LATEST; remove the singularity
remote login call and ensure no secret is printed to stdout so credentials are
only provided via environment variables.
- Line 136: The push condition uses github.event.inputs which is undefined for
push/release events so images never get pushed; replace the current line
starting with "push: ${{ (github.event.inputs.push_images..." with a condition
that mirrors build-relink, e.g. use "push: ${{ github.event_name !=
'pull_request' }}" (or otherwise check github.event_name != 'pull_request') so
push/release events will allow image pushes.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6dc6b58a-a311-4202-bd04-8a44c2094064

📥 Commits

Reviewing files that changed from the base of the PR and between df0d2ba and c0474c2.

📒 Files selected for processing (1)
  • .github/workflows/quantms-containers.yml

Comment on lines +145 to +162
- name: Set up Singularity
if: ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }}
uses: eWaterCycle/setup-singularity@v7
with:
singularity-version: 3.8.7

- name: Save Docker image for Singularity conversion
if: ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }}
run: |
sudo apt-get update && sudo apt-get install -y singularity-container || true
docker save ${{ matrix.tag }} -o image.tar
singularity build image.sif docker-archive://image.tar
export SINGULARITY_DOCKER_USERNAME=${{ secrets.GHCR_USERNAME }}
export SINGULARITY_DOCKER_PASSWORD=${{ secrets.GHCR_TOKEN }}
singularity push image.sif oras://ghcr.io/bigbio/${{ matrix.sif }}
docker save ${{ matrix.tag }} -o ${{ matrix.context }}.tar

- name: Convert Docker image to Singularity
if: ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }}
run: |
# Convert Docker tar to Singularity SIF
singularity build ${{ matrix.context }}.sif docker-archive://${{ matrix.context }}.tar
# Verify the SIF file exists
ls -la ${{ matrix.context }}.sif

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Singularity steps share the same broken push condition.

Lines 146, 152, and 157 use the same condition as line 136, which will prevent Singularity conversion on push and release events. Apply the same fix (github.event_name != 'pull_request' && github.event.inputs.push_images != 'false') to all these conditions.

The approach of using eWaterCycle/setup-singularity@v7 and the docker save → singularity build flow is sound.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 145 - 162, Update the
three Singularity workflow steps ("Set up Singularity", "Save Docker image for
Singularity conversion", and "Convert Docker image to Singularity") to use the
corrected push condition github.event_name != 'pull_request' &&
github.event.inputs.push_images != 'false' instead of the current broken
expression; keep the same actions (using eWaterCycle/setup-singularity@v7,
docker save of matrix.tag to matrix.context.tar, and singularity build
docker-archive://matrix.context.tar to produce matrix.context.sif) but change
their if: expressions so Singularity conversion runs on push/release and only
skips when inputs.push_images is explicitly 'false'.

@enryH

enryH commented Apr 10, 2026 •

Copy link
Copy Markdown
Collaborator

@enryH

enryH commented Apr 10, 2026

Copy link
Copy Markdown
Collaborator

Once we know it works, I can revert the last commit then it should be ready to merge.

@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: 3

♻️ Duplicate comments (2)
.github/workflows/quantms-containers.yml (2)

168-179: ⚠️ Potential issue | 🟠 Major

Use env-based Singularity registry auth in CI instead of remote login.

The PR thread already reports failures with this exact singularity remote login ... oras://ghcr.io flow, and these three jobs still rely on it. SingularityCE explicitly documents SINGULARITY_DOCKER_USERNAME / SINGULARITY_DOCKER_PASSWORD as the CI/CD-friendly path, while registry logins are stored for reuse rather than kept purely job-scoped. I’d switch these jobs back to env-based auth before singularity push. (docs.sylabs.io)

Suggested fix pattern
-      - name: Login and Deploy Container
+      - name: Login and Deploy Container
+        env:
+          SINGULARITY_DOCKER_USERNAME: ${{ github.actor }}
+          SINGULARITY_DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
         run: |
-          echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io
-
           # Push with version tag
           singularity push ${{ matrix.context }}.sif oras://${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.sif }}

Also applies to: 236-247, 294-301

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 168 - 179, Replace the
ephemeral `singularity remote login ... oras://ghcr.io` step with
environment-based auth by exporting SINGULARITY_DOCKER_USERNAME and
SINGULARITY_DOCKER_PASSWORD from GitHub secrets before the `singularity push`
calls (e.g., export SINGULARITY_DOCKER_USERNAME="${{ github.actor }}" and export
SINGULARITY_DOCKER_PASSWORD="${{ secrets.GITHUB_TOKEN }}"), remove the
`singularity remote login` invocation, and keep the existing `singularity push
${{ matrix.context }}.sif oras://${{ env.REGISTRY }}/${{ github.repository_owner
}}/${{ matrix.sif }}` and the conditional push to the latest tag; apply the same
replacement to the other two similar job blocks that use `singularity remote
login` (the blocks that also run `singularity push` with
`matrix.context`/`matrix.sif`).

140-169: ⚠️ Potential issue | 🔴 Critical

The publish guard is still using the wrong input context.

github.event.inputs.push_images is string-typed, so == true never matches, and the == '' fallback is unsafe because GitHub coerces null to '' in expressions. Since this same condition gates both the Docker push and all Singularity publish steps here, non-workflow_dispatch events can still satisfy the guard unexpectedly. Use the boolean-preserving inputs context and gate it by event name instead. (docs.github.com)

Suggested fix
-          push: ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }}
+          push: ${{ github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_images) }}
-        if: ${{ (github.event.inputs.push_images == true || github.event.inputs.push_images == '') }}
+        if: ${{ github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch' || inputs.push_images) }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 140 - 169, Replace the
current publish guard expressions that use github.event.inputs.push_images with
a guard that first checks the event type and then uses the boolean-preserving
inputs context; e.g. for the steps "Set up Singularity", "Save Docker image for
Singularity conversion", "Convert Docker image to Singularity" and "Login and
Deploy Container" change the if: to something like: if: ${{ github.event_name ==
'workflow_dispatch' && (inputs.push_images == true || inputs.push_images == '')
}} so the condition uses github.event_name and inputs.push_images (not
github.event.inputs) to avoid string coercion and unexpected matches.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/quantms-containers.yml:
- Around line 182-186: The success notice step ("Notify on success") currently
runs unconditionally on success and claims Docker and Singularity images were
pushed; update this step so it only claims pushes when the publish condition
actually ran (e.g., add the publish guard to the step's if: expression such as
combining success() with the same publish condition used for the image push
steps or a job output like needs.publish.result == 'success'), or change the
echo text to a neutral message (e.g., "Successfully built DiaNN ${{
matrix.context }} images (pushed when publish enabled)") so it doesn't assert
pushes when publish was skipped; modify the step named "Notify on success" and
its echo string accordingly.
- Around line 70-77: The DIANN_ALL matrix contains a hardcoded namespace for the
diann-2.5.0 entry: update the "tag" value in the diann-2.5.0 object (within
DIANN_ALL) to use the templated owner instead of ghcr.io/bigbio (i.e. replace
ghcr.io/bigbio with ghcr.io/${{ github.repository_owner }}), and ensure any
related fields (like "extra_tags" if intended) follow the same owner templating
so the workflow_dispatch/release runs publish under the repository_owner for
diann-2.5.0 as with the other diann entries.
- Line 196: The condition using always() allows downstream jobs to run even when
predecessors failed; change the if expressions for the build-relink job (which
currently checks always() && needs.detect-changes.outputs.has_relink == 'true'
&& github.repository_owner == 'bigbio') to instead require that the
predecessor(s) succeeded or were skipped, e.g. check needs.build-diann.result ==
'success' || needs.build-diann.result == 'skipped' (and/or
needs.detect-changes.result similarly) combined with
needs.detect-changes.outputs.has_relink == 'true' and github.repository_owner ==
'bigbio'; do the same for the sync-openms job so it only publishes when prior
jobs like build-diann and build-relink have result == 'success' or 'skipped'
rather than using always().

---

Duplicate comments:
In @.github/workflows/quantms-containers.yml:
- Around line 168-179: Replace the ephemeral `singularity remote login ...
oras://ghcr.io` step with environment-based auth by exporting
SINGULARITY_DOCKER_USERNAME and SINGULARITY_DOCKER_PASSWORD from GitHub secrets
before the `singularity push` calls (e.g., export
SINGULARITY_DOCKER_USERNAME="${{ github.actor }}" and export
SINGULARITY_DOCKER_PASSWORD="${{ secrets.GITHUB_TOKEN }}"), remove the
`singularity remote login` invocation, and keep the existing `singularity push
${{ matrix.context }}.sif oras://${{ env.REGISTRY }}/${{ github.repository_owner
}}/${{ matrix.sif }}` and the conditional push to the latest tag; apply the same
replacement to the other two similar job blocks that use `singularity remote
login` (the blocks that also run `singularity push` with
`matrix.context`/`matrix.sif`).
- Around line 140-169: Replace the current publish guard expressions that use
github.event.inputs.push_images with a guard that first checks the event type
and then uses the boolean-preserving inputs context; e.g. for the steps "Set up
Singularity", "Save Docker image for Singularity conversion", "Convert Docker
image to Singularity" and "Login and Deploy Container" change the if: to
something like: if: ${{ github.event_name == 'workflow_dispatch' &&
(inputs.push_images == true || inputs.push_images == '') }} so the condition
uses github.event_name and inputs.push_images (not github.event.inputs) to avoid
string coercion and unexpected matches.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: ee43c3af-9f65-4dfe-811c-efe27f062bbc

📥 Commits

Reviewing files that changed from the base of the PR and between c0474c2 and 5ad93e4.

📒 Files selected for processing (1)
  • .github/workflows/quantms-containers.yml

Comment on lines 70 to +77
DIANN_ALL='[
{"context":"diann-2.5.0","tag":"ghcr.io/bigbio/diann:2.5.0","sif":"diann-sif:2.5.0","extra_tags":"ghcr.io/bigbio/diann:latest","chg":"CHG_250"},
{"context":"diann-2.3.2","tag":"ghcr.io/bigbio/diann:2.3.2","sif":"diann-sif:2.3.2","extra_tags":"","chg":"CHG_232"},
{"context":"diann-2.2.0","tag":"ghcr.io/bigbio/diann:2.2.0","sif":"diann-sif:2.2.0","extra_tags":"","chg":"CHG_220"},
{"context":"diann-2.1.0","tag":"ghcr.io/bigbio/diann:2.1.0","sif":"diann-sif:2.1.0","extra_tags":"","chg":"CHG_210"},
{"context":"diann-2.0.2","tag":"ghcr.io/bigbio/diann:2.0.2","sif":"diann-sif:2.0.2","extra_tags":"","chg":"CHG_20"},
{"context":"diann-1.9.2","tag":"ghcr.io/bigbio/diann:1.9.2","sif":"diann-sif:1.9.2","extra_tags":"","chg":"CHG_192"},
{"context":"diann-1.8.1","tag":"ghcr.io/bigbio/diann:1.8.1","sif":"diann-sif:1.8.1","extra_tags":"","chg":"CHG_181"}
{"context":"diann-2.3.2","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.3.2","sif":"diann-sif:2.3.2","extra_tags":"","chg":"CHG_232"},
{"context":"diann-2.2.0","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.2.0","sif":"diann-sif:2.2.0","extra_tags":"","chg":"CHG_220"},
{"context":"diann-2.1.0","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.1.0","sif":"diann-sif:2.1.0","extra_tags":"","chg":"CHG_210"},
{"context":"diann-2.0.2","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.0.2","sif":"diann-sif:2.0.2","extra_tags":"","chg":"CHG_20"},
{"context":"diann-1.9.2","tag":"ghcr.io/${{ github.repository_owner }}/diann:1.9.2","sif":"diann-sif:1.9.2","extra_tags":"","chg":"CHG_192"},
{"context":"diann-1.8.1","tag":"ghcr.io/${{ github.repository_owner }}/diann:1.8.1","sif":"diann-sif:1.8.1","extra_tags":"","chg":"CHG_181"}

@coderabbitai coderabbitai Bot Apr 15, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

diann-2.5.0 is still pinned to ghcr.io/bigbio.

This block updates the later DIA-NN entries to ${{ github.repository_owner }}, but leaves the 2.5.0 matrix entry on the hardcoded namespace. release / workflow_dispatch will still publish that one image to bigbio, so forks and org mirrors remain broken for the newest image.

Suggested fix
-            {"context":"diann-2.5.0","tag":"ghcr.io/bigbio/diann:2.5.0","sif":"diann-sif:2.5.0","extra_tags":"ghcr.io/bigbio/diann:latest","chg":"CHG_250"},
+            {"context":"diann-2.5.0","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.5.0","sif":"diann-sif:2.5.0","extra_tags":"ghcr.io/${{ github.repository_owner }}/diann:latest","chg":"CHG_250"},
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
DIANN_ALL='[
{"context":"diann-2.5.0","tag":"ghcr.io/bigbio/diann:2.5.0","sif":"diann-sif:2.5.0","extra_tags":"ghcr.io/bigbio/diann:latest","chg":"CHG_250"},
{"context":"diann-2.3.2","tag":"ghcr.io/bigbio/diann:2.3.2","sif":"diann-sif:2.3.2","extra_tags":"","chg":"CHG_232"},
{"context":"diann-2.2.0","tag":"ghcr.io/bigbio/diann:2.2.0","sif":"diann-sif:2.2.0","extra_tags":"","chg":"CHG_220"},
{"context":"diann-2.1.0","tag":"ghcr.io/bigbio/diann:2.1.0","sif":"diann-sif:2.1.0","extra_tags":"","chg":"CHG_210"},
{"context":"diann-2.0.2","tag":"ghcr.io/bigbio/diann:2.0.2","sif":"diann-sif:2.0.2","extra_tags":"","chg":"CHG_20"},
{"context":"diann-1.9.2","tag":"ghcr.io/bigbio/diann:1.9.2","sif":"diann-sif:1.9.2","extra_tags":"","chg":"CHG_192"},
{"context":"diann-1.8.1","tag":"ghcr.io/bigbio/diann:1.8.1","sif":"diann-sif:1.8.1","extra_tags":"","chg":"CHG_181"}
{"context":"diann-2.3.2","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.3.2","sif":"diann-sif:2.3.2","extra_tags":"","chg":"CHG_232"},
{"context":"diann-2.2.0","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.2.0","sif":"diann-sif:2.2.0","extra_tags":"","chg":"CHG_220"},
{"context":"diann-2.1.0","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.1.0","sif":"diann-sif:2.1.0","extra_tags":"","chg":"CHG_210"},
{"context":"diann-2.0.2","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.0.2","sif":"diann-sif:2.0.2","extra_tags":"","chg":"CHG_20"},
{"context":"diann-1.9.2","tag":"ghcr.io/${{ github.repository_owner }}/diann:1.9.2","sif":"diann-sif:1.9.2","extra_tags":"","chg":"CHG_192"},
{"context":"diann-1.8.1","tag":"ghcr.io/${{ github.repository_owner }}/diann:1.8.1","sif":"diann-sif:1.8.1","extra_tags":"","chg":"CHG_181"}
DIANN_ALL='[
{"context":"diann-2.5.0","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.5.0","sif":"diann-sif:2.5.0","extra_tags":"ghcr.io/${{ github.repository_owner }}/diann:latest","chg":"CHG_250"},
{"context":"diann-2.3.2","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.3.2","sif":"diann-sif:2.3.2","extra_tags":"","chg":"CHG_232"},
{"context":"diann-2.2.0","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.2.0","sif":"diann-sif:2.2.0","extra_tags":"","chg":"CHG_220"},
{"context":"diann-2.1.0","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.1.0","sif":"diann-sif:2.1.0","extra_tags":"","chg":"CHG_210"},
{"context":"diann-2.0.2","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.0.2","sif":"diann-sif:2.0.2","extra_tags":"","chg":"CHG_20"},
{"context":"diann-1.9.2","tag":"ghcr.io/${{ github.repository_owner }}/diann:1.9.2","sif":"diann-sif:1.9.2","extra_tags":"","chg":"CHG_192"},
{"context":"diann-1.8.1","tag":"ghcr.io/${{ github.repository_owner }}/diann:1.8.1","sif":"diann-sif:1.8.1","extra_tags":"","chg":"CHG_181"}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 70 - 77, The DIANN_ALL
matrix contains a hardcoded namespace for the diann-2.5.0 entry: update the
"tag" value in the diann-2.5.0 object (within DIANN_ALL) to use the templated
owner instead of ghcr.io/bigbio (i.e. replace ghcr.io/bigbio with ghcr.io/${{
github.repository_owner }}), and ensure any related fields (like "extra_tags" if
intended) follow the same owner templating so the workflow_dispatch/release runs
publish under the repository_owner for diann-2.5.0 as with the other diann
entries.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

correct. to be changed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@enryH, thanks for confirming! Here's the specific change needed for the diann-2.5.0 entry:

-            {"context":"diann-2.5.0","tag":"ghcr.io/bigbio/diann:2.5.0","sif":"diann-sif:2.5.0","extra_tags":"ghcr.io/bigbio/diann:latest","chg":"CHG_250"},
+            {"context":"diann-2.5.0","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.5.0","sif":"diann-sif:2.5.0","extra_tags":"ghcr.io/${{ github.repository_owner }}/diann:latest","chg":"CHG_250"},

Both the tag and extra_tags fields need updating so the 2.5.0 (latest) image is consistent with all the other DIA-NN entries.

Comment on lines +182 to +186
- name: Notify on success
if: success()
run: |
echo "::notice::Successfully built and pushed DiaNN ${{ matrix.context }} Docker and Singularity images to ghcr.io/${{ github.repository_owner }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Success notification is inaccurate on build-only runs.

On pull_request runs—or on workflow_dispatch when push_images is false—the publish steps can be skipped, but this notice still says both Docker and Singularity images were pushed. Gate the notice with the publish condition or change the wording to reflect build-only success.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 182 - 186, The success
notice step ("Notify on success") currently runs unconditionally on success and
claims Docker and Singularity images were pushed; update this step so it only
claims pushes when the publish condition actually ran (e.g., add the publish
guard to the step's if: expression such as combining success() with the same
publish condition used for the image push steps or a job output like
needs.publish.result == 'success'), or change the echo text to a neutral message
(e.g., "Successfully built DiaNN ${{ matrix.context }} images (pushed when
publish enabled)") so it doesn't assert pushes when publish was skipped; modify
the step named "Notify on success" and its echo string accordingly.

name: "Relink ${{ matrix.context }}"
needs: [detect-changes, build-diann]
if: always() && needs.detect-changes.outputs.has_relink == 'true'
if: always() && needs.detect-changes.outputs.has_relink == 'true' && github.repository_owner == 'bigbio'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cd .github/workflows && wc -l quantms-containers.yml

Repository: bigbio/quantms-containers

Length of output: 95


🏁 Script executed:

cat -n .github/workflows/quantms-containers.yml | sed -n '180,210p'

Repository: bigbio/quantms-containers

Length of output: 1361


🏁 Script executed:

cat -n .github/workflows/quantms-containers.yml | sed -n '240,270p'

Repository: bigbio/quantms-containers

Length of output: 1576


🏁 Script executed:

cat -n .github/workflows/quantms-containers.yml | sed -n '1,50p'

Repository: bigbio/quantms-containers

Length of output: 1865


🏁 Script executed:

rg -n "needs\." .github/workflows/quantms-containers.yml | head -20

Repository: bigbio/quantms-containers

Length of output: 397


🏁 Script executed:

cat -n .github/workflows/quantms-containers.yml | sed -n '40,50p'

Repository: bigbio/quantms-containers

Length of output: 573


🏁 Script executed:

cat -n .github/workflows/quantms-containers.yml | sed -n '110,130p'

Repository: bigbio/quantms-containers

Length of output: 846


🏁 Script executed:

cat -n .github/workflows/quantms-containers.yml | sed -n '192,200p'

Repository: bigbio/quantms-containers

Length of output: 501


🏁 Script executed:

cat -n .github/workflows/quantms-containers.yml | sed -n '250,260p'

Repository: bigbio/quantms-containers

Length of output: 575


always() allows downstream jobs to publish even after upstream failures.

GitHub Actions treats always() as "run even if a needed job did not succeed." In this workflow:

  • build-relink (line 196) can push images even if build-diann fails
  • sync-openms (line 254) can publish even if build-diann or build-relink fails

If the intent is only to tolerate skipped predecessors, key the condition off needs.<job>.result being success or skipped instead.

Suggested fix
-    if: always() && needs.detect-changes.outputs.has_relink == 'true' && github.repository_owner == 'bigbio'
+    if: needs.detect-changes.outputs.has_relink == 'true'
+      && github.repository_owner == 'bigbio'
+      && contains(fromJSON('["success","skipped"]'), needs.build-diann.result)
-    if: always() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch') && github.repository_owner == 'bigbio'
+    if: (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
+      && github.repository_owner == 'bigbio'
+      && contains(fromJSON('["success","skipped"]'), needs.build-diann.result)
+      && contains(fromJSON('["success","skipped"]'), needs.build-relink.result)

Also applies to: 254-254

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml at line 196, The condition using
always() allows downstream jobs to run even when predecessors failed; change the
if expressions for the build-relink job (which currently checks always() &&
needs.detect-changes.outputs.has_relink == 'true' && github.repository_owner ==
'bigbio') to instead require that the predecessor(s) succeeded or were skipped,
e.g. check needs.build-diann.result == 'success' || needs.build-diann.result ==
'skipped' (and/or needs.detect-changes.result similarly) combined with
needs.detect-changes.outputs.has_relink == 'true' and github.repository_owner ==
'bigbio'; do the same for the sync-openms job so it only publishes when prior
jobs like build-diann and build-relink have result == 'success' or 'skipped'
rather than using always().

@josenimo

Copy link
Copy Markdown

pinging @ypriverol @enryH , merging this would be nice with the Roma release :)

@ypriverol

Copy link
Copy Markdown
Contributor Author

I think all the containers needed by the release are available @josenimo

@josenimo

Copy link
Copy Markdown

ah sorry, was looking at my fork, you got it!
Thanks, testing everything out today :)

@josenimo

josenimo commented Apr 21, 2026 •

Copy link
Copy Markdown

sorry for being a nuisance, I might be getting this wrong.

I forked the current main 052ebaaa509c4a38a00915e79c8e17996f238b5e
and trigger the github action to build and release the packages, however they all failed at the Log in to GHCR step:

Screenshot 2026-04-21 at 18 37 08 -------------------------- -------------------------- Screenshot 2026-04-21 at 18 37 45

@ypriverol

Copy link
Copy Markdown
Contributor Author

Builds outside the main branch require credentials, and you can't build from outside the main repo. What would you like to achieve?

@enryH

enryH commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

@josenimo You might need to look at your 'package' (ghcr) configuration. Allow the deployment from workflows: https://docs.github.com/en/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#configuring-access-to-packages-for-your-personal-account

You can also set this up for your entire organization, in case you are the owner.

@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

♻️ Duplicate comments (5)
.github/workflows/quantms-containers.yml (5)

182-185: ⚠️ Potential issue | 🟡 Minor

Avoid claiming images were pushed when publishing was skipped.

On pull requests, and on manual build-only runs after push_images is honored, this success notice will be inaccurate.

Suggested neutral wording
-          echo "::notice::Successfully built and pushed DiaNN ${{ matrix.context }} Docker and Singularity images to ghcr.io/${{ github.repository_owner }}"
+          echo "::notice::Successfully built DiaNN ${{ matrix.context }} images; published only when the workflow publish guard is enabled."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 182 - 185, The success
notice step named "Notify on success" currently runs on success() and prints
that images were "built and pushed"; update this so it only claims images were
pushed when the publish step actually ran (e.g., guard on the same condition
used to push images such as the push_images matrix/variable) or change the echo
text to a neutral message; locate the "Notify on success" step and modify its if
condition or the echo string (the run that prints "Successfully built and pushed
DiaNN ... images") so it either checks the push_images flag/context before
saying "pushed" or uses wording like "built (and pushed if enabled)".

70-77: ⚠️ Potential issue | 🟠 Major

Keep the DIA-NN 2.5.0 image under the repository owner.

Line 71 still publishes 2.5.0 and latest to ghcr.io/bigbio, unlike the other DIA-NN matrix entries. Forks and org mirrors will still push the newest image to the wrong namespace.

Suggested fix
-            {"context":"diann-2.5.0","tag":"ghcr.io/bigbio/diann:2.5.0","sif":"diann-sif:2.5.0","extra_tags":"ghcr.io/bigbio/diann:latest","chg":"CHG_250"},
+            {"context":"diann-2.5.0","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.5.0","sif":"diann-sif:2.5.0","extra_tags":"ghcr.io/${{ github.repository_owner }}/diann:latest","chg":"CHG_250"},
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 70 - 77, The DIANN_ALL
matrix contains an entry where the first element uses hardcoded ghcr.io/bigbio
for the 2.5.0 image (context "diann-2.5.0", tag "ghcr.io/bigbio/diann:2.5.0",
extra_tags "ghcr.io/bigbio/diann:latest"); change both the tag and extra_tags to
use the repository owner variable (ghcr.io/${{ github.repository_owner
}}/diann:2.5.0 and ghcr.io/${{ github.repository_owner }}/diann:latest) so it
matches the other DIANN_ALL entries and avoids publishing to the bigbio
namespace for forks.

168-174: ⚠️ Potential issue | 🟠 Major

Restore CI-scoped Singularity registry credentials or verify this login path.

These steps still use singularity remote login with the Actions token. Given the reported GHCR/Singularity failures in this PR, prefer the previously working SINGULARITY_DOCKER_USERNAME / SINGULARITY_DOCKER_PASSWORD environment approach, or verify this exact Singularity version supports the remote-login ORAS push path reliably in Actions.

Safer CI-scoped auth pattern
       - name: Login and Deploy Container
         if: ${{ github.event_name != 'pull_request' }}
+        env:
+          SINGULARITY_DOCKER_USERNAME: ${{ github.actor }}
+          SINGULARITY_DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
         run: |
-          echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io
-
           # Push with version tag
           singularity push ${{ matrix.context }}.sif oras://${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.sif }}

Apply the same pattern to the Relink and OpenMS Singularity push steps.

For SingularityCE 3.8.7, what is the recommended non-interactive authentication method for pushing SIF images to an ORAS/GHCR registry from CI: SINGULARITY_DOCKER_USERNAME/SINGULARITY_DOCKER_PASSWORD or singularity remote login --password-stdin?

Also applies to: 236-244, 294-299

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 168 - 174, The CI
currently uses a non-verified `singularity remote login ... --password-stdin`
call inside the "Login and Deploy Container" step and then runs `singularity
push`; revert to the safer CI-scoped auth pattern by replacing the remote-login
invocation with environment-based credentials (export
SINGULARITY_DOCKER_USERNAME and SINGULARITY_DOCKER_PASSWORD from secrets) or, if
you intend to keep remote-login, add a verification check that the Singularity
version supports non-interactive ORAS remote login in Actions and gate the step
accordingly; update the same pattern for the other push steps that run
`singularity push` (the Relink and OpenMS pushes) so all pushes use the
consistent, verified auth method.

196-196: ⚠️ Potential issue | 🟠 Major

Don’t let downstream publish jobs run after failed prerequisites.

always() also runs after failed dependencies. If the goal is to tolerate skipped jobs, require each needed job to be success or skipped before publishing Relink/OpenMS artifacts.

Suggested job guards
-    if: always() && needs.detect-changes.outputs.has_relink == 'true' && github.repository_owner == 'bigbio'
+    if: needs.detect-changes.outputs.has_relink == 'true'
+      && github.repository_owner == 'bigbio'
+      && contains(fromJSON('["success","skipped"]'), needs.build-diann.result)
-    if: always() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch') && github.repository_owner == 'bigbio'
+    if: (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
+      && github.repository_owner == 'bigbio'
+      && contains(fromJSON('["success","skipped"]'), needs.build-diann.result)
+      && contains(fromJSON('["success","skipped"]'), needs.build-relink.result)
#!/bin/bash
# Description: Verify job-level dependency conditions that use always().
rg -n -C3 'if:.*always\(\)|needs: \[|needs\..*\.result' .github/workflows/quantms-containers.yml

Also applies to: 254-254

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml at line 196, The current job guard
uses always() so downstream publish jobs run even if prerequisites failed;
update the if condition(s) (e.g. the line containing "if: always() &&
needs.detect-changes.outputs.has_relink == 'true' && github.repository_owner ==
'bigbio'") to require each dependency’s result be success or skipped (for
example replace always() with a logical check like "(needs.detect-changes.result
== 'success' || needs.detect-changes.result == 'skipped')" and do the same for
any other needs.* jobs referenced (also update the similar guard at the other
occurrence around line 254) so publishing Relink/OpenMS only runs when
prerequisites are not failing.

136-179: ⚠️ Potential issue | 🟠 Major

Honor workflow_dispatch.push_images before publishing.

The workflow defines push_images, but these push/conversion/sync paths only skip pull requests. A manual run with push_images: false will still push Docker, Singularity, and OpenMS artifacts.

Suggested guard pattern
-          push: ${{ github.event_name != 'pull_request' }}
+          push: ${{ github.event_name != 'pull_request' && github.event.inputs.push_images != 'false' }}

Apply the same publish guard to the Singularity setup/save/build/push steps, the Relink Docker/Singularity publish steps, and the OpenMS sync job or its push steps:

-    if: always() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch') && github.repository_owner == 'bigbio'
+    if: always()
+      && (github.event_name == 'release' || github.event_name == 'workflow_dispatch')
+      && github.event.inputs.push_images != 'false'
+      && github.repository_owner == 'bigbio'

Verify the effective publish paths with a read-only search:

#!/bin/bash
# Description: Inspect every publish/conversion guard that should honor workflow_dispatch.push_images.
rg -n -C2 'push_images|push:|singularity push|docker push|if:.*pull_request|Sync OpenMS|Build and push Docker image|Build and Push DiaNN' .github/workflows/quantms-containers.yml

Also applies to: 217-247, 254-301

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/quantms-containers.yml around lines 136 - 179, The
workflow pushes Singularity/Docker/OpenMS artifacts even when a manual run set
workflow_dispatch.push_images=false; update the publish guard to check both
non-pull_request and the push_images input for workflow_dispatch. Replace the
existing if: conditions on steps "Set up Singularity", "Save Docker image for
Singularity conversion", "Convert Docker image to Singularity", and "Login and
Deploy Container" (and the analogous Relink/Publish and OpenMS sync push steps)
with a combined expression like ${{ github.event_name != 'pull_request' &&
(github.event_name != 'workflow_dispatch' || github.event.inputs.push_images ==
'true') }} so pushes only occur when appropriate, and apply the same guard to
any docker save/singularity build/singularity push/docker push steps
(references: matrix.context, matrix.tag, matrix.sif, env.REGISTRY).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@README.md`:
- Around line 116-128: The paragraph under "Fork repository to get access to
private quantms containers" is incomplete and doesn't tell the reader to fork
and run the workflow in their own namespace; update the README.md text that
references `.github/workflows/quantms-containers.yml` to explicitly instruct
users to fork the repo into their GitHub account or organization, enable
Actions, and trigger the quantms-containers workflow in their fork so the DIA-NN
images are pushed to ghcr.io/{their-owner}/diann; also clarify they must replace
`bigbio` with their GitHub username/org in the container tags and, if push
fails, point them to configure package access on ghcr.io as currently
referenced.

---

Duplicate comments:
In @.github/workflows/quantms-containers.yml:
- Around line 182-185: The success notice step named "Notify on success"
currently runs on success() and prints that images were "built and pushed";
update this so it only claims images were pushed when the publish step actually
ran (e.g., guard on the same condition used to push images such as the
push_images matrix/variable) or change the echo text to a neutral message;
locate the "Notify on success" step and modify its if condition or the echo
string (the run that prints "Successfully built and pushed DiaNN ... images") so
it either checks the push_images flag/context before saying "pushed" or uses
wording like "built (and pushed if enabled)".
- Around line 70-77: The DIANN_ALL matrix contains an entry where the first
element uses hardcoded ghcr.io/bigbio for the 2.5.0 image (context
"diann-2.5.0", tag "ghcr.io/bigbio/diann:2.5.0", extra_tags
"ghcr.io/bigbio/diann:latest"); change both the tag and extra_tags to use the
repository owner variable (ghcr.io/${{ github.repository_owner }}/diann:2.5.0
and ghcr.io/${{ github.repository_owner }}/diann:latest) so it matches the other
DIANN_ALL entries and avoids publishing to the bigbio namespace for forks.
- Around line 168-174: The CI currently uses a non-verified `singularity remote
login ... --password-stdin` call inside the "Login and Deploy Container" step
and then runs `singularity push`; revert to the safer CI-scoped auth pattern by
replacing the remote-login invocation with environment-based credentials (export
SINGULARITY_DOCKER_USERNAME and SINGULARITY_DOCKER_PASSWORD from secrets) or, if
you intend to keep remote-login, add a verification check that the Singularity
version supports non-interactive ORAS remote login in Actions and gate the step
accordingly; update the same pattern for the other push steps that run
`singularity push` (the Relink and OpenMS pushes) so all pushes use the
consistent, verified auth method.
- Line 196: The current job guard uses always() so downstream publish jobs run
even if prerequisites failed; update the if condition(s) (e.g. the line
containing "if: always() && needs.detect-changes.outputs.has_relink == 'true' &&
github.repository_owner == 'bigbio'") to require each dependency’s result be
success or skipped (for example replace always() with a logical check like
"(needs.detect-changes.result == 'success' || needs.detect-changes.result ==
'skipped')" and do the same for any other needs.* jobs referenced (also update
the similar guard at the other occurrence around line 254) so publishing
Relink/OpenMS only runs when prerequisites are not failing.
- Around line 136-179: The workflow pushes Singularity/Docker/OpenMS artifacts
even when a manual run set workflow_dispatch.push_images=false; update the
publish guard to check both non-pull_request and the push_images input for
workflow_dispatch. Replace the existing if: conditions on steps "Set up
Singularity", "Save Docker image for Singularity conversion", "Convert Docker
image to Singularity", and "Login and Deploy Container" (and the analogous
Relink/Publish and OpenMS sync push steps) with a combined expression like ${{
github.event_name != 'pull_request' && (github.event_name != 'workflow_dispatch'
|| github.event.inputs.push_images == 'true') }} so pushes only occur when
appropriate, and apply the same guard to any docker save/singularity
build/singularity push/docker push steps (references: matrix.context,
matrix.tag, matrix.sif, env.REGISTRY).
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 821a8b03-fae0-4df8-bb17-9d554a1bc9ff

📥 Commits

Reviewing files that changed from the base of the PR and between 5ad93e4 and 81fac0d.

📒 Files selected for processing (2)
  • .github/workflows/quantms-containers.yml
  • README.md

Comment thread README.md
Comment on lines +116 to +128
### Fork repository to get access to private quantms containers

The workflow in `.github/workflows/quantms-containers.yml` is configured to build and push
DIA-NN containers to the private `ghcr.io/{owner}/diann` registry. To access these
containers, which runs the action in your own GitHub organization. If this fails,
you will need to configure the packages on ghcr.io to allow pushing from
the GitHub Actions. This can be configured for the entire organization or for each
package individually. Please refer to the
[GitHub documentation](https://docs.github.com/en/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#configuring-access-to-packages-for-your-personal-account)
for more details.

> Below you then need to replace `bigbio` with your GitHub username or organization name
> in the container tags.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Clarify the fork-and-run instruction.

The paragraph currently has an incomplete sentence and skips the actual instruction to fork the repo and run the workflow in the user’s namespace.

Suggested wording fix
-### Fork repository to get access to private quantms containers
+### Fork the repository to access private QuantMS containers
 
 The workflow in `.github/workflows/quantms-containers.yml` is configured to build and push
 DIA-NN containers to the private `ghcr.io/{owner}/diann` registry. To access these 
-containers, which runs the action in your own GitHub organization. If this fails,
+containers, fork this repository and run the workflow in your own GitHub user or organization namespace. If this fails,
 you will need to configure the packages on ghcr.io to allow pushing from 
 the GitHub Actions. This can be configured for the entire organization or for each
 package individually. Please refer to the
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
### Fork repository to get access to private quantms containers
The workflow in `.github/workflows/quantms-containers.yml` is configured to build and push
DIA-NN containers to the private `ghcr.io/{owner}/diann` registry. To access these
containers, which runs the action in your own GitHub organization. If this fails,
you will need to configure the packages on ghcr.io to allow pushing from
the GitHub Actions. This can be configured for the entire organization or for each
package individually. Please refer to the
[GitHub documentation](https://docs.github.com/en/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#configuring-access-to-packages-for-your-personal-account)
for more details.
> Below you then need to replace `bigbio` with your GitHub username or organization name
> in the container tags.
### Fork the repository to access private QuantMS containers
The workflow in `.github/workflows/quantms-containers.yml` is configured to build and push
DIA-NN containers to the private `ghcr.io/{owner}/diann` registry. To access these
containers, fork this repository and run the workflow in your own GitHub user or organization namespace. If this fails,
you will need to configure the packages on ghcr.io to allow pushing from
the GitHub Actions. This can be configured for the entire organization or for each
package individually. Please refer to the
[GitHub documentation](https://docs.github.com/en/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#configuring-access-to-packages-for-your-personal-account)
for more details.
> Below you then need to replace `bigbio` with your GitHub username or organization name
> in the container tags.
🧰 Tools
🪛 LanguageTool

[grammar] ~116-~116: Ensure spelling is correct
Context: ...ork repository to get access to private quantms containers The workflow in `.github/wo...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~116-~116: Ensure spelling is correct
Context: ...get access to private quantms containers The workflow in `.github/workflows/quant...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[uncategorized] ~118-~118: The official name of this software platform is spelled with a capital “H”.
Context: ...ate quantms containers The workflow in .github/workflows/quantms-containers.yml is co...

(GITHUB)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 116 - 128, The paragraph under "Fork repository to
get access to private quantms containers" is incomplete and doesn't tell the
reader to fork and run the workflow in their own namespace; update the README.md
text that references `.github/workflows/quantms-containers.yml` to explicitly
instruct users to fork the repo into their GitHub account or organization,
enable Actions, and trigger the quantms-containers workflow in their fork so the
DIA-NN images are pushed to ghcr.io/{their-owner}/diann; also clarify they must
replace `bigbio` with their GitHub username/org in the container tags and, if
push fails, point them to configure package access on ghcr.io as currently
referenced.

@enryH

enryH commented Apr 22, 2026

Copy link
Copy Markdown
Collaborator

@ypriverol The settings are now updated. Could you maybe take a screenshot for the documentation from it?

Otherwise I reverted that PRs do no trigger pushing of images and added some notes to the REAMDE.

@josenimo

Copy link
Copy Markdown

Hey @enryH sorry again, I think I misunderstood.
I forked the current main, and triggered the github action manually which resulted in the build failures.
I cannot access the package settings you mentioned because the packages could not be created.
I think for my purposes, cloning the repo and manually creating .tar images, and converting to .sif is simple enough.
Thank you and sorry for the constant nudging :)

@ypriverol
ypriverol requested a review from Copilot April 22, 2026 08:59
@ypriverol
ypriverol merged commit 8bba4da into main Apr 22, 2026
12 checks passed

Copilot AI 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.

Pull request overview

This PR refactors the container build/deploy GitHub Actions workflow to make image publishing more flexible for forks/orgs, updates authentication to use GITHUB_TOKEN, and expands the Docker→Singularity publishing flow, with corresponding README guidance.

Changes:

  • Parameterizes/updates image tagging to use github.repository_owner and introduces a top-level REGISTRY env var.
  • Updates GHCR authentication to use secrets.GITHUB_TOKEN and restricts some publish jobs to bigbio.
  • Refines Singularity build/push steps and adds success/failure notifications; adds README instructions for forks/permissions.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 10 comments.

File Description
README.md Adds user guidance for forking and configuring GHCR package access for private DIA-NN images.
.github/workflows/quantms-containers.yml Refactors build/publish workflow for Docker + Singularity images, updates auth, conditions, and tagging.
Comments suppressed due to low confidence (1)

.github/workflows/quantms-containers.yml:142

  • docker/build-push-action is configured with both push: ${{ github.event_name != 'pull_request' }} and load: true. When this runs on non-PR events, Buildx will be asked to both --push and --load, which are mutually exclusive and typically fails. Consider either (a) removing load and pulling the pushed tag before docker save, or (b) keeping load and disabling push (or using outputs to produce a tar/OCI archive for Singularity conversion).
          context: ./${{ matrix.context }}
          push: ${{ github.event_name != 'pull_request' }}
          load: true
          tags: |

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 217 to 218
- name: Build and push Docker image
uses: docker/build-push-action@v5

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

In the Relink job, the subsequent docker/build-push-action step is set up to both push images (on non-PR events) and load them into the local daemon. Buildx --push and --load are mutually exclusive and commonly cause the build to fail on releases/workflow_dispatch. Use one output mode (push OR load/archive), and if you need a local image for docker save, pull the pushed tag (or use outputs to a tar/OCI archive) before Singularity conversion.

Copilot uses AI. Check for mistakes.
Comment on lines 70 to +72
DIANN_ALL='[
{"context":"diann-2.5.0","tag":"ghcr.io/bigbio/diann:2.5.0","sif":"diann-sif:2.5.0","extra_tags":"ghcr.io/bigbio/diann:latest","chg":"CHG_250"},
{"context":"diann-2.3.2","tag":"ghcr.io/bigbio/diann:2.3.2","sif":"diann-sif:2.3.2","extra_tags":"","chg":"CHG_232"},
{"context":"diann-2.2.0","tag":"ghcr.io/bigbio/diann:2.2.0","sif":"diann-sif:2.2.0","extra_tags":"","chg":"CHG_220"},
{"context":"diann-2.1.0","tag":"ghcr.io/bigbio/diann:2.1.0","sif":"diann-sif:2.1.0","extra_tags":"","chg":"CHG_210"},
{"context":"diann-2.0.2","tag":"ghcr.io/bigbio/diann:2.0.2","sif":"diann-sif:2.0.2","extra_tags":"","chg":"CHG_20"},
{"context":"diann-1.9.2","tag":"ghcr.io/bigbio/diann:1.9.2","sif":"diann-sif:1.9.2","extra_tags":"","chg":"CHG_192"},
{"context":"diann-1.8.1","tag":"ghcr.io/bigbio/diann:1.8.1","sif":"diann-sif:1.8.1","extra_tags":"","chg":"CHG_181"}
{"context":"diann-2.3.2","tag":"ghcr.io/${{ github.repository_owner }}/diann:2.3.2","sif":"diann-sif:2.3.2","extra_tags":"","chg":"CHG_232"},

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

The DIANN_ALL matrix still hardcodes ghcr.io/bigbio/diann:2.5.0 and ghcr.io/bigbio/diann:latest for the 2.5.0 entry, while the other entries use ${{ github.repository_owner }}. This makes the workflow inconsistent and breaks the stated goal of working for forks/other orgs (and can cause push failures when the owner isn’t bigbio). Update the 2.5.0 tag/extra_tags to use the same owner-based pattern (and ideally the top-level REGISTRY env var) as the other matrix entries.

Copilot uses AI. Check for mistakes.
- name: Login and Deploy Container
if: ${{ github.event_name != 'pull_request' }}
run: |
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

Avoid passing ${{ secrets.GITHUB_TOKEN }} to echo unquoted in a shell script. While it’s unlikely, special characters or word-splitting could break the command; quoting (and ensuring the token never gets echoed) makes this more robust and reduces the chance of accidental exposure in logs.

Suggested change
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io
printf '%s' "${{ secrets.GITHUB_TOKEN }}" | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io

Copilot uses AI. Check for mistakes.
export SINGULARITY_DOCKER_PASSWORD=${{ secrets.GHCR_TOKEN }}
singularity push image.sif oras://ghcr.io/bigbio/${{ matrix.sif }}

echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

Same as above: ${{ secrets.GITHUB_TOKEN }} is passed to echo unquoted. Quote it to avoid shell word-splitting/globbing issues and to make the login command more robust.

Suggested change
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io
printf '%s\n' "${{ secrets.GITHUB_TOKEN }}" | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io

Copilot uses AI. Check for mistakes.
Comment thread README.md
Comment on lines +119 to +125
DIA-NN containers to the private `ghcr.io/{owner}/diann` and `ghcr.io/{owner}/diann-sif`
registries. To access these
containers, which runs the action in your own GitHub organization. If this fails,
you will need to configure the packages on ghcr.io to allow pushing from
the GitHub Actions. This can be configured for the entire organization or for each
package individually. Please refer to the
[GitHub documentation](https://docs.github.com/en/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#configuring-access-to-packages-for-your-personal-account)

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

This paragraph has a grammatical issue and is hard to follow: “To access these containers, which runs the action…” is a sentence fragment. Also, ghcr.io/{owner}/diann / diann-sif are image/package names in the GHCR registry, not separate “registries”. Rephrase to clearly instruct users to fork the repo and (if needed) adjust GHCR package permissions for Actions.

Suggested change
DIA-NN containers to the private `ghcr.io/{owner}/diann` and `ghcr.io/{owner}/diann-sif`
registries. To access these
containers, which runs the action in your own GitHub organization. If this fails,
you will need to configure the packages on ghcr.io to allow pushing from
the GitHub Actions. This can be configured for the entire organization or for each
package individually. Please refer to the
[GitHub documentation](https://docs.github.com/en/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#configuring-access-to-packages-for-your-personal-account)
DIA-NN containers to the private GHCR packages `ghcr.io/{owner}/diann` and
`ghcr.io/{owner}/diann-sif`. To use these containers, fork this repository and run
the workflow in your own GitHub account or organization. If the workflow cannot push
the images, update the package permissions in GitHub Container Registry to allow
GitHub Actions to publish to these packages. This can be configured for the entire
organization or for each package individually. Please refer to the
[GitHub documentation](https://docs.github.com/en/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility#configuring-access-to-packages-for-your-personal-account)

Copilot uses AI. Check for mistakes.
- name: Log in to GitHub Container Registry (GHCR)
uses: docker/login-action@v3
with:
registry: ghcr.io

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

This job still hardcodes registry: ghcr.io even though the workflow now defines a top-level REGISTRY env var. For consistency (and to keep registry changes centralized), consider using ${{ env.REGISTRY }} here as well.

Suggested change
registry: ghcr.io
registry: ${{ env.REGISTRY }}

Copilot uses AI. Check for mistakes.
fi

- name: Notify on success
if: success()

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

The success notification always runs when the job succeeds, including on pull_request runs where push is false and the Singularity steps are skipped. That makes the message misleading (“built and pushed …”). Restrict this step to non-PR events (or adjust the notice text to reflect build-only behavior on PRs).

Suggested change
if: success()
if: ${{ success() && github.event_name != 'pull_request' }}

Copilot uses AI. Check for mistakes.
- name: Login and Deploy Container
if: ${{ github.event_name != 'pull_request' }}
run: |
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

The Singularity remote login is hardcoded to oras://ghcr.io even though the workflow introduces a REGISTRY env var and uses it elsewhere. If REGISTRY is meant to be configurable, use it consistently for the ORAS endpoint as well (and keep the oras:// scheme in mind).

Suggested change
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://${{ env.REGISTRY }}

Copilot uses AI. Check for mistakes.
sudo apt-get update && sudo apt-get install -y singularity-container || true
export SINGULARITY_DOCKER_USERNAME=${{ secrets.GHCR_USERNAME }}
export SINGULARITY_DOCKER_PASSWORD=${{ secrets.GHCR_TOKEN }}
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

${{ secrets.GITHUB_TOKEN }} is piped into singularity remote login via echo without quotes. Quote the secret to avoid shell parsing edge cases and keep the login command reliable.

Suggested change
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io
echo "${{ secrets.GITHUB_TOKEN }}" | singularity remote login -u ${{ github.actor }} --password-stdin oras://ghcr.io

Copilot uses AI. Check for mistakes.
- name: Log in to GitHub Container Registry (GHCR)
uses: docker/login-action@v3
with:
registry: ghcr.io

Copilot AI Apr 22, 2026

Copy link

Choose a reason for hiding this comment

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

The workflow introduces env.REGISTRY, but this login step still hardcodes registry: ghcr.io. Using ${{ env.REGISTRY }} here would keep registry configuration consistent across jobs.

Suggested change
registry: ghcr.io
registry: ${{ env.REGISTRY }}

Copilot uses AI. Check for mistakes.
This was referenced Jun 13, 2026
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.

6 participants