Update GitHub token input to require CUSTOM_GH_TOKEN for authentication in workflows

This commit is contained in:
Palash Tyagi 2025-05-05 01:04:56 +01:00
parent 80083ce77c
commit 7e27539529
4 changed files with 10 additions and 5 deletions

View File

@ -12,8 +12,9 @@ inputs:
required: true required: true
github-token: github-token:
description: 'GitHub token with repo admin read permissions' description: 'GitHub token with repo admin read permissions'
required: false required: true
default: ${{ secrets.CUSTOM_GH_TOKEN }}
outputs: outputs:
use-runner: use-runner:

View File

@ -29,7 +29,7 @@ jobs:
with: with:
primary-runner: "self-hosted" primary-runner: "self-hosted"
fallback-runner: "ubuntu-latest" fallback-runner: "ubuntu-latest"
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.CUSTOM_GH_TOKEN }}
docs-and-testcov: docs-and-testcov:
needs: pick-runner needs: pick-runner

View File

@ -18,7 +18,7 @@ jobs:
with: with:
primary-runner: "self-hosted" primary-runner: "self-hosted"
fallback-runner: "ubuntu-latest" fallback-runner: "ubuntu-latest"
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.CUSTOM_GH_TOKEN }}
run-benchmarks: run-benchmarks:
needs: pick-runner needs: pick-runner

View File

@ -12,18 +12,22 @@ concurrency:
jobs: jobs:
pick-runner: pick-runner:
if: github.event.pull_request.draft == false if: github.event.pull_request.draft == false
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
runner: ${{ steps.choose.outputs.use-runner }} runner: ${{ steps.choose.outputs.use-runner }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- id: choose - id: choose
uses: ./.github/actions/runner-fallback uses: ./.github/actions/runner-fallback
with: with:
primary-runner: "self-hosted" primary-runner: "self-hosted"
fallback-runner: "ubuntu-latest" fallback-runner: "ubuntu-latest"
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.CUSTOM_GH_TOKEN }}
run-unit-tests: run-unit-tests:
needs: pick-runner needs: pick-runner