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

workflows/release-binaries-all: Pass secrets on to release-binaries workflow #101866

Merged
merged 1 commit into from
Aug 5, 2024

Conversation

tstellar
Copy link
Collaborator

@tstellar tstellar commented Aug 4, 2024

A called workflow does not have access to secrets by default, so we need to explicitly pass any secret that we want to use.

…orkflow

A called workflow does not have access to secrets by default, so we need
to explicitly pass any secret that we want to use.
@tstellar tstellar requested a review from tru August 4, 2024 05:50
@llvmbot
Copy link
Member

llvmbot commented Aug 4, 2024

@llvm/pr-subscribers-github-workflow

Author: Tom Stellard (tstellar)

Changes

A called workflow does not have access to secrets by default, so we need to explicitly pass any secret that we want to use.


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

2 Files Affected:

  • (modified) .github/workflows/release-binaries-all.yml (+5-1)
  • (modified) .github/workflows/release-binaries.yml (+5)
diff --git a/.github/workflows/release-binaries-all.yml b/.github/workflows/release-binaries-all.yml
index 73c9d96946e33..394b0c74d24ed 100644
--- a/.github/workflows/release-binaries-all.yml
+++ b/.github/workflows/release-binaries-all.yml
@@ -91,4 +91,8 @@ jobs:
       release-version: "${{ needs.setup-variables.outputs.release-version }}"
       upload: ${{ needs.setup-variables.outputs.upload == 'true'}}
       runs-on: "${{ matrix.runs-on }}"
-
+    secrets:
+      # This will be empty for pull_request events, but that's fine, because
+      # the release-binaries workflow does not use this secret for the
+      # pull_request event.
+      RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 7cc8b7a1e56e8..847fe000c19a3 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -37,6 +37,11 @@ on:
         description: "Runner to use for the build"
         required: true
         type: string
+    secrets:
+      RELEASE_TASKS_USER_TOKEN:
+        description: "Secret used to check user permissions."
+        required: false
+
 
 permissions:
   contents: read # Default everything to read-only

Copy link
Collaborator

@tru tru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tstellar tstellar merged commit 1fb1a5d into llvm:main Aug 5, 2024
36 of 40 checks passed
@tstellar tstellar added this to the LLVM 19.X Release milestone Aug 5, 2024
@tstellar
Copy link
Collaborator Author

tstellar commented Aug 5, 2024

/cherry-pick 1fb1a5d

llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Aug 5, 2024
…orkflow (llvm#101866)

A called workflow does not have access to secrets by default, so we need
to explicitly pass any secret that we want to use.

(cherry picked from commit 1fb1a5d)
@llvmbot
Copy link
Member

llvmbot commented Aug 5, 2024

/pull-request #102068

tru pushed a commit to llvmbot/llvm-project that referenced this pull request Aug 10, 2024
…orkflow (llvm#101866)

A called workflow does not have access to secrets by default, so we need
to explicitly pass any secret that we want to use.

(cherry picked from commit 1fb1a5d)
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