Refactor github-token input to use CUSTOM_GH_TOKEN secret for authentication in runner-fallback action

This commit is contained in:
Palash Tyagi 2025-05-05 00:52:52 +01:00
parent 179553fe38
commit 80083ce77c

View File

@ -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: |