-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
workflows: Fix permissions for release-sources job #100750
Conversation
For reusable workflows, the called workflow cannot upgrade it's permissions, and since the default permission is none, we need to explicitly declare 'contents: read' when calling the release-sources workflow. Fixes the error: The workflow is requesting 'contents: read', but is only allowed 'contents: none'.
@llvm/pr-subscribers-github-workflow Author: Tom Stellard (tstellar) ChangesFor reusable workflows, the called workflow cannot upgrade it's permissions, and since the default permission is none, we need to explicitly declare 'contents: read' when calling the release-sources workflow. Fixes the error: Full diff: https://github.com/llvm/llvm-project/pull/100750.diff 1 Files Affected:
diff --git a/.github/workflows/release-tasks.yml b/.github/workflows/release-tasks.yml
index 2ed56dace1d4c..116261f8e76b7 100644
--- a/.github/workflows/release-tasks.yml
+++ b/.github/workflows/release-tasks.yml
@@ -89,6 +89,7 @@ jobs:
release-sources:
name: Package Release Sources
permissions:
+ contents: read
id-token: write
attestations: write
needs:
|
e036e2b
to
ebc1627
Compare
/cherry-pick 82c2259 |
For reusable workflows, the called workflow cannot upgrade it's permissions, and since the default permission is none, we need to explicitly declare 'contents: read' when calling the release-sources workflow. Fixes the error: The workflow is requesting 'contents: read', but is only allowed 'contents: none'. (cherry picked from commit 82c2259)
/pull-request #102373 |
For reusable workflows, the called workflow cannot upgrade it's permissions, and since the default permission is none, we need to explicitly declare 'contents: read' when calling the release-sources workflow. Fixes the error: The workflow is requesting 'contents: read', but is only allowed 'contents: none'. (cherry picked from commit 82c2259)
For reusable workflows, the called workflow cannot upgrade it's permissions, and since the default permission is none, we need to explicitly declare 'contents: read' when calling the release-sources workflow. Fixes the error: The workflow is requesting 'contents: read', but is only allowed 'contents: none'.
For reusable workflows, the called workflow cannot upgrade it's permissions, and since the default permission is none, we need to explicitly declare 'contents: read' when calling the release-sources workflow.
Fixes the error:
The workflow is requesting 'contents: read', but is only allowed 'contents: none'.