Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Action doesn't work when using trusted publishers #321

Closed
mnaser opened this issue Feb 21, 2025 · 2 comments · Fixed by #323
Closed

Action doesn't work when using trusted publishers #321

mnaser opened this issue Feb 21, 2025 · 2 comments · Fixed by #323

Comments

@mnaser
Copy link
Contributor

mnaser commented Feb 21, 2025

I did some digging and the reason behind it is that trusted publisher code relies on some environment variables that start with ACTIONS_, such as: ACTIONS_ID_TOKEN_REQUEST_URL.

Since those are not in the list here:

https://github.com/PyO3/maturin-action/blob/main/src/index.ts#L232-L251

It's not passing it down to Maturin:

https://github.com/PyO3/maturin/blob/865f965e088bd4433d9832defb1706b3456b492e/src/upload.rs#L270-L273

I'll push up a PR in a second.

@mnaser
Copy link
Contributor Author

mnaser commented Feb 21, 2025

I'm blind, it was right there. I have something else causing this failure.

@mnaser mnaser closed this as completed Feb 21, 2025
@mnaser mnaser reopened this Feb 21, 2025
@mnaser
Copy link
Contributor Author

mnaser commented Feb 21, 2025

Actually, this is the issue:

https://github.com/PyO3/maturin/blob/865f965e088bd4433d9832defb1706b3456b492e/src/upload.rs#L267-L269

Maturin checks if GITHUB_ACTIONS is set, and it is not set from what I see:

2025-02-21T18:09:35.4416942Z [command]/usr/bin/docker run --rm --workdir /home/runner/work/magnum-cluster-api/magnum-cluster-api -e DEBIAN_FRONTEND=noninteractive -e ARCHFLAGS -e _PYTHON_SYSCONFIGDATA_NAME -e ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e ACTIONS_ID_TOKEN_REQUEST_URL -e ACTIONS_ID_TOKEN_REQUEST_TOKEN -e ACTIONS_RESULTS_URL -e ACTIONS_CACHE_SERVICE_V2 -e CARGO_INCREMENTAL -e CARGO_TERM_COLOR -v /home/runner/work/_temp/run-maturin-action.sh:/home/runner/work/_temp/run-maturin-action.sh -v /home/runner/work/magnum-cluster-api/magnum-cluster-api:/home/runner/work/magnum-cluster-api/magnum-cluster-api quay.io/pypa/manylinux2014_x86_64:latest /home/runner/work/_temp/run-maturin-action.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant