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

ci: npm publish requires write permissions for id-token #21612

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

JamieMagee
Copy link
Contributor

Changes

Gives our release-npm workflow id-token: write permissions

Context

#19170
Build currently failing with:

npm ERR! code EUSAGE
npm ERR! Automatic provenance generation not supported outside of GitHub Actions

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@secustor
Copy link
Collaborator

Why does it need write permissions? Does it now commit sig files back into to the repo?

@JamieMagee
Copy link
Contributor Author

No, it's just the required permission. See the documentation:

The job or workflow run requires a permissions setting with id-token: write. You won't be able to request the OIDC JWT ID token if the permissions setting for id-token is set to read or none.

We already have this configured for our container image signing:

https://github.com/containerbase/base/blob/5af9584eb6ab9371a123aaa0422f5a62546a0307/.github/workflows/build-push.yml#L41-L44

@JamieMagee JamieMagee added this pull request to the merge queue Apr 19, 2023
Merged via the queue into main with commit f61d49f Apr 19, 2023
@JamieMagee JamieMagee deleted the ci/publish-token-write branch April 19, 2023 21:25
@JamieMagee JamieMagee mentioned this pull request Apr 20, 2023
6 tasks
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 35.55.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants