Repository navigation
Conversation
- only run on modification (detect-changes) - relink workflow - openms-sync step Relink and open-ms step could be set to run only if the owner is bigbio
- see if token works
Updates (new images, instructions)
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughReplaces hardcoded GHCR owner with repository-owner-scoped registry, centralizes env.REGISTRY, switches GHCR auth to Changes
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (2)
.github/workflows/quantms-containers.yml (2)
254-260: Hardcodedbigbioin 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 inbuild-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_NAMEenvironment variable is defined but never used.The
SINGULARITY_IMAGE_NAMEenv 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
📒 Files selected for processing (1)
.github/workflows/quantms-containers.yml
|
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.2before: export SINGULARITY_DOCKER_USERNAME=***
export SINGULARITY_DOCKER_PASSWORD=***
singularity push image.sif oras://ghcr.io/bigbio/diann-sif:2.3.2 |
|
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
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. |
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
|
Here is probably why things didn't work as expected in this reppo: singularityhub/github-ci#6 |
|
@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: |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (4)
.github/workflows/quantms-containers.yml (4)
237-243:⚠️ Potential issue | 🟠 MajorSame 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 | 🟠 MajorSame 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 | 🟠 MajorUse 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 loginstores credentials to disk, which is unsuitable for ephemeral CI. UseSINGULARITY_DOCKER_USERNAMEandSINGULARITY_DOCKER_PASSWORDenvironment 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 | 🔴 CriticalPush condition will fail to push images on
pushandreleaseevents.For
push/releaseevents,github.event.inputsis undefined, causing both comparisons to fail. This means Docker images will never be pushed for these event types—only forworkflow_dispatch. Compare withbuild-relink(line 217) which correctly usesgithub.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
📒 Files selected for processing (1)
.github/workflows/quantms-containers.yml
| - 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 |
There was a problem hiding this comment.
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'.
|
@ypriverol I guess it is as @Skitionek mentioned, that the setup might be changed, see singularityhub/github-ci#6 (comment) You will need to associate the ghcr packages with the repo. |
|
Once we know it works, I can revert the last commit then it should be ready to merge. |
There was a problem hiding this comment.
Actionable comments posted: 3
♻️ Duplicate comments (2)
.github/workflows/quantms-containers.yml (2)
168-179:⚠️ Potential issue | 🟠 MajorUse 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.ioflow, and these three jobs still rely on it. SingularityCE explicitly documentsSINGULARITY_DOCKER_USERNAME/SINGULARITY_DOCKER_PASSWORDas 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 beforesingularity 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 | 🔴 CriticalThe publish guard is still using the wrong input context.
github.event.inputs.push_imagesis string-typed, so== truenever matches, and the== ''fallback is unsafe because GitHub coercesnullto''in expressions. Since this same condition gates both the Docker push and all Singularity publish steps here, non-workflow_dispatchevents can still satisfy the guard unexpectedly. Use the boolean-preservinginputscontext 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
📒 Files selected for processing (1)
.github/workflows/quantms-containers.yml
| 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"} |
There was a problem hiding this comment.
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.
| 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.
There was a problem hiding this comment.
@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.
| - 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 }}" | ||
|
|
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cd .github/workflows && wc -l quantms-containers.ymlRepository: 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 -20Repository: 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 ifbuild-diannfailssync-openms(line 254) can publish even ifbuild-diannorbuild-relinkfails
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().
|
pinging @ypriverol @enryH , merging this would be nice with the |
|
I think all the containers needed by the release are available @josenimo |
|
ah sorry, was looking at my fork, you got it! |
|
Builds outside the main branch require credentials, and you can't build from outside the main repo. What would you like to achieve? |
|
@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. |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (5)
.github/workflows/quantms-containers.yml (5)
182-185:⚠️ Potential issue | 🟡 MinorAvoid claiming images were pushed when publishing was skipped.
On pull requests, and on manual build-only runs after
push_imagesis 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 | 🟠 MajorKeep the DIA-NN 2.5.0 image under the repository owner.
Line 71 still publishes
2.5.0andlatesttoghcr.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 | 🟠 MajorRestore CI-scoped Singularity registry credentials or verify this login path.
These steps still use
singularity remote loginwith the Actions token. Given the reported GHCR/Singularity failures in this PR, prefer the previously workingSINGULARITY_DOCKER_USERNAME/SINGULARITY_DOCKER_PASSWORDenvironment 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 | 🟠 MajorDon’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 besuccessorskippedbefore 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.ymlAlso 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 | 🟠 MajorHonor
workflow_dispatch.push_imagesbefore publishing.The workflow defines
push_images, but these push/conversion/sync paths only skip pull requests. A manual run withpush_images: falsewill 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.ymlAlso 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
📒 Files selected for processing (2)
.github/workflows/quantms-containers.ymlREADME.md
| ### 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. |
There was a problem hiding this comment.
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.
| ### 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.
|
@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. |
|
Hey @enryH sorry again, I think I misunderstood. |
There was a problem hiding this comment.
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_ownerand introduces a top-levelREGISTRYenv var. - Updates GHCR authentication to use
secrets.GITHUB_TOKENand restricts some publish jobs tobigbio. - 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-actionis configured with bothpush: ${{ github.event_name != 'pull_request' }}andload: true. When this runs on non-PR events, Buildx will be asked to both--pushand--load, which are mutually exclusive and typically fails. Consider either (a) removingloadand pulling the pushed tag beforedocker save, or (b) keepingloadand disablingpush(or usingoutputsto 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.
| - name: Build and push Docker image | ||
| uses: docker/build-push-action@v5 |
There was a problem hiding this comment.
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.
| 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"}, |
There was a problem hiding this comment.
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.
| - 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 |
There was a problem hiding this comment.
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.
| 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 |
| 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 |
There was a problem hiding this comment.
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.
| 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 |
| 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) |
There was a problem hiding this comment.
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.
| 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) |
| - name: Log in to GitHub Container Registry (GHCR) | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io |
There was a problem hiding this comment.
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.
| registry: ghcr.io | |
| registry: ${{ env.REGISTRY }} |
| fi | ||
|
|
||
| - name: Notify on success | ||
| if: success() |
There was a problem hiding this comment.
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).
| if: success() | |
| if: ${{ success() && github.event_name != 'pull_request' }} |
| - 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 |
There was a problem hiding this comment.
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).
| 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 }} |
| 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 |
There was a problem hiding this comment.
${{ 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.
| 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 |
| - name: Log in to GitHub Container Registry (GHCR) | ||
| uses: docker/login-action@v3 | ||
| with: | ||
| registry: ghcr.io |
There was a problem hiding this comment.
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.
| registry: ghcr.io | |
| registry: ${{ env.REGISTRY }} |


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:
REGISTRY,IMAGE_NAME,SINGULARITY_IMAGE_NAME) to make image naming and registry usage more flexible and reusable across jobs.${{ github.repository_owner }}instead of hardcoded values, enabling workflows to work for forks and other organizations.Build and Push Improvements:
build-diannjob with improved naming, retry logic, metadata extraction, and tagging strategies (including date-based tags). [1] [2]Authentication and Security Updates:
${{ 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:
build-relink,sync-openms) to only run for thebigbioorganization, preventing accidental pushes from forks or other users. [1] [2]Workflow Usability and Clarity:
These changes collectively make the workflow more robust, secure, and easier to maintain.
Summary by CodeRabbit
Chores
Documentation