Skip to content

Conversation

@stefdoerr
Copy link

No description provided.

Comment on lines +204 to +249
strategy:
fail-fast: false
matrix:
config_file:
[
"conda_package/variants/win_64_cuda_compilercuda-nvcccuda_compiler_version12.0numpy1.22python3.10.____cpython.yaml",
"conda_package/variants/win_64_cuda_compilercuda-nvcccuda_compiler_version12.0numpy1.22python3.9.____cpython.yaml",
"conda_package/variants/win_64_cuda_compilercuda-nvcccuda_compiler_version12.0numpy1.23python3.11.____cpython.yaml",
"conda_package/variants/win_64_cuda_compilercuda-nvcccuda_compiler_version12.0numpy1.26python3.12.____cpython.yaml",
]
runs-on: windows-2022

steps:
- uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v3
with:
miniconda-version: "latest"
activate-environment: ../deploy-env
python-version: "3.10"

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Setup CUDA Toolkit
id: cuda-toolkit
shell: pwsh
run: conda_package/scripts/setup_cuda.ps1
env:
INPUT_CUDA_VERSION: 12.0.0

- name: Build openmm package
shell: bash -l {0}
run: |
git config --global --add safe.directory '*'
conda install anaconda-client conda-build
conda clean --all -y
conda build conda_package/recipe/ --variant-config-files ${{ matrix.config_file }} --output-folder ./pkg/ --no-include-recipe --no-anaconda-upload -c conda-forge
env:
OPENMM_VERSION: ${{ github.ref_name }}
OPENMM_COMMIT: ${{ github.sha }}

- name: Upload to conda
shell: bash -l {0}
run: |
anaconda -t ${{ secrets.ANACONDA_TOKEN_BASIC }} upload -u acellera pkg/*/openmm-*.conda --skip-existing

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 5 months ago

To fix the issue, we will add a permissions block at the workflow level to define the minimal permissions required for the workflow. Based on the operations in the workflow, the following permissions are necessary:

  • contents: read for accessing repository contents.
  • packages: write for uploading packages to the repository.

This change will ensure that the workflow has only the permissions it needs, reducing the risk of unintended access.


Suggested changeset 1
.github/workflows/conda_publish.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/conda_publish.yml b/.github/workflows/conda_publish.yml
--- a/.github/workflows/conda_publish.yml
+++ b/.github/workflows/conda_publish.yml
@@ -2,2 +2,6 @@
 
+permissions:
+  contents: read
+  packages: write
+
 on:
EOF
@@ -2,2 +2,6 @@

permissions:
contents: read
packages: write

on:
Copilot is powered by AI and may make mistakes. Always verify output.
@stefdoerr stefdoerr changed the title Cibuildwheel PR PyPI + Conda builds Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant