Skip to content

ci: adopt conda-actions v2.0 (grype scan + drop anaconda-client)#171

Merged
KedoKudo merged 3 commits into
mainfrom
test/conda-actions-v2
Jun 5, 2026
Merged

ci: adopt conda-actions v2.0 (grype scan + drop anaconda-client)#171
KedoKudo merged 3 commits into
mainfrom
test/conda-actions-v2

Conversation

@KedoKudo
Copy link
Copy Markdown
Member

@KedoKudo KedoKudo commented Jun 4, 2026

Adopt neutrons/conda-actions v2.0. Validated on CI (see checks).

Changes

  1. Bump the four neutrons/conda-actions refs to @v2:
    • pkg-install, pkg-verify: were pinned to a v1-era SHA
    • publish: was @main — v2.0 uploads via pixi upload anaconda (no anaconda install)
    • pkg-remove: was @v1 — v2.0 self-installs anaconda-client
  2. Add a dependency-scan job using the new conda-actions/grype action: installs the built .conda and scans the resulting env, uploading SARIF to code scanning (non-blocking — fail-build: false).
  3. Drop the anaconda-client dependency from the package feature, now that publish/pkg-remove no longer need it in-project. The local conda-publish task switches to pixi upload anaconda --owner neutrons. pixi.lock regenerated (removes anaconda-client + orphaned transitive deps; typer now sourced from PyPI via toml-cli).

All four actions are input-compatible at v2.0 (verified against the upstream action.yml definitions — no input renames).

Validated by CI

  • pkg-install@v2 + pkg-verify@v2 (conda-build) — real version-match check passed
  • grype@v2 (dependency-scan) — scanned the installed env, uploaded SARIF
  • ✅ frozen install + unit tests pass with anaconda-client removed
  • ⏸️ publish@v2 / pkg-remove@v2 are gated to next/tags, so they don't run on a PR. Verified by reading the v2.0 source + the upstream dry-run test workflows.

Heads-up

grype reports findings (medium+ with fixes available) to the Security tab as non-blocking alerts.

Scope

python_project_template is the only repo in the group consuming neutrons/conda-actions; others use neutrons/conda-verify (separate repo, unaffected) or call anaconda upload directly.

Assisted-With: Claude Opus 4.8 (1M context)

Bump the four neutrons/conda-actions refs to the @v2 moving tag:
- pkg-install / pkg-verify: were pinned to a v1-era SHA
- publish: was @main (now uploads via `pixi upload anaconda`)
- pkg-remove: was @v1 (now self-installs anaconda-client)

All four are input-compatible at v2.0 (verified against the upstream
action.yml definitions). Add a dependency-scan job using the new
conda-actions/grype action to scan the installed package environment
and upload SARIF to code scanning.

Test run for the conda-actions v2.0 upgrade before propagating.

Assisted-With: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

conda-actions v2.0 no longer needs anaconda-client in the project env:
publish uses `pixi upload`, and pkg-remove self-installs anaconda-client.
Remove it from the package feature and switch the local conda-publish
task to `pixi upload anaconda --owner neutrons`. Regenerate pixi.lock
(drops anaconda-client + its orphaned transitive deps).

Assisted-With: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@KedoKudo KedoKudo marked this pull request as ready for review June 4, 2026 18:53
@KedoKudo KedoKudo changed the title ci: test conda-actions v2.0 upgrade + grype scan ci: adopt conda-actions v2.0 (grype scan + drop anaconda-client) Jun 4, 2026
@KedoKudo KedoKudo self-assigned this Jun 4, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates the repository’s packaging/deployment pipeline to use neutrons/conda-actions@v2, adds a Grype-based dependency scanning job that uploads SARIF to GitHub code scanning, and removes anaconda-client from the Pixi package feature now that publishing/removal are handled without it.

Changes:

  • Switch pkg-install, pkg-verify, publish, and pkg-remove workflow steps to neutrons/conda-actions@v2.
  • Add a new dependency-scan job that installs the built .conda artifact and scans the resulting environment using neutrons/conda-actions/grype@v2.
  • Remove anaconda-client from pyproject.toml and update the local conda-publish Pixi task to use pixi upload anaconda.

Reviewed changes

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

File Description
pyproject.toml Drops anaconda-client from the package feature and updates the local conda publish task to use Pixi’s upload command.
pixi.lock Regenerates the lockfile to reflect removal of anaconda-client and resulting dependency graph changes.
.github/workflows/test_and_deploy.yaml Moves conda workflow steps to conda-actions@v2 and adds a Grype dependency-scan job that uploads SARIF results.
Comments suppressed due to low confidence (1)

.github/workflows/test_and_deploy.yaml:185

  • ${{ env.CONDA_LABEL }} is not defined anywhere in this workflow, so the label input will resolve to an empty string. Because this overrides the action default (dev), pkg-remove will likely not match any labeled files and won't remove old packages as intended.
          anaconda_token: ${{ secrets.ANACONDA_TOKEN }}
          organization: neutrons
          package_name: ${{ env.PKG_NAME }}
          label: ${{ env.CONDA_LABEL }}
          keep: 5

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

Comment thread .github/workflows/test_and_deploy.yaml Outdated
Comment thread .github/workflows/test_and_deploy.yaml Outdated
Move the "Scan installed environment with Grype" step into the
conda-build job, right after "Verify conda package", and drop the
standalone dependency-scan job. The conda package is already installed
in conda-build, so the step reuses steps.install.outputs.conda_install_dir
instead of re-checking-out, re-downloading the artifact, and
re-installing it. The SARIF-upload permissions (security-events: write,
actions: read) move onto conda-build accordingly.

Addresses review feedback on PR #171.

Assisted-With: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@jmborr jmborr left a comment

Choose a reason for hiding this comment

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

👌

@KedoKudo KedoKudo merged commit 658388b into main Jun 5, 2026
7 checks passed
@KedoKudo KedoKudo deleted the test/conda-actions-v2 branch June 5, 2026 15:12
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.

4 participants