Skip to content

[CHORE] ci.yaml: scope publish-nightly-wheels AWS env to the publish step#1137

Open
shaun0927 wants to merge 1 commit into
Nixtla:mainfrom
shaun0927:chore/ci-scope-aws-env-to-publish
Open

[CHORE] ci.yaml: scope publish-nightly-wheels AWS env to the publish step#1137
shaun0927 wants to merge 1 commit into
Nixtla:mainfrom
shaun0927:chore/ci-scope-aws-env-to-publish

Conversation

@shaun0927

Copy link
Copy Markdown
Contributor

The publish-nightly-wheels job in ci.yaml declares the AWS credentials at the job level (lines 86–89), so the keys are present in the env of every step — actions/checkout, actions/download-artifact, actions/setup-python, pip install awscli beautifulsoup4 — even though only the final Publish wheels step calls aws s3.

Moving the env block to the single step that needs it follows the same least-privilege intent as #1112 (explicit workflow permissions:) and matches how the OIDC token is already step-scoped in python-publish.yml.

Diff

 publish-nightly-wheels:
     if: github.event_name == 'push'
     needs: [run-tests]
-    env:
-      AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_NIXTLA_PACKAGES }}
-      AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_NIXTLA_PACKAGES }}
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@…
       …
       - name: Publish wheels
+        env:
+          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_NIXTLA_PACKAGES }}
+          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_NIXTLA_PACKAGES }}
         run: |
           pip install awscli beautifulsoup4
           ...

…step

The AWS credentials were declared at the job level, exposing them to
every step in the job (checkout, download-artifact, setup-python,
pip install). Only the final `aws s3` step needs them. Mirrors the
step-scoped OIDC token in python-publish.yml and the least-privilege
intent of Nixtla#1112.
@CLAassistant

CLAassistant commented Apr 17, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

2 participants