Skip to content

Conversation

@tstellar
Copy link
Collaborator

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'.
@llvmbot
Copy link
Member

llvmbot commented Jul 26, 2024

@llvm/pr-subscribers-github-workflow

Author: Tom Stellard (tstellar)

Changes

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'.


Full diff: https://github.com/llvm/llvm-project/pull/100750.diff

1 Files Affected:

  • (modified) .github/workflows/release-tasks.yml (+1)
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:

@tstellar tstellar force-pushed the release-sources-fix branch from e036e2b to ebc1627 Compare July 26, 2024 14:27
@tstellar tstellar merged commit 82c2259 into llvm:main Aug 7, 2024
@tstellar tstellar added this to the LLVM 19.X Release milestone Aug 7, 2024
@tstellar
Copy link
Collaborator Author

tstellar commented Aug 7, 2024

/cherry-pick 82c2259

llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Aug 7, 2024
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)
@llvmbot
Copy link
Member

llvmbot commented Aug 7, 2024

/pull-request #102373

tru pushed a commit to llvmbot/llvm-project that referenced this pull request Aug 10, 2024
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

3 participants