From 80083ce77c7051d385557ef5b513fcbc6b3cbb5d Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 00:52:52 +0100 Subject: [PATCH] Refactor github-token input to use CUSTOM_GH_TOKEN secret for authentication in runner-fallback action --- .github/actions/runner-fallback/action.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/actions/runner-fallback/action.yml b/.github/actions/runner-fallback/action.yml index 0a31714..ea0b805 100644 --- a/.github/actions/runner-fallback/action.yml +++ b/.github/actions/runner-fallback/action.yml @@ -10,6 +10,10 @@ inputs: fallback-runner: description: 'Comma-separated label list or single label for the fallback (e.g. "ubuntu-latest")' required: true + github-token: + description: 'GitHub token with repo admin read permissions' + required: false + default: ${{ secrets.CUSTOM_GH_TOKEN }} outputs: use-runner: @@ -23,9 +27,7 @@ runs: id: pick shell: bash env: - # token needs to have reop admin read permissions - # https://docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#list-self-hosted-runners-for-a-repository - TOKEN: ${{ secrets.CUSTOM_GH_TOKEN }} + TOKEN: ${{ inputs.github-token }} PRIMARY: ${{ inputs.primary-runner }} FALLBACK: ${{ inputs.fallback-runner }} run: |