From 7e27539529cdbb925e898fabad998ce95067097a Mon Sep 17 00:00:00 2001 From: Palash Tyagi <23239946+Magnus167@users.noreply.github.com> Date: Mon, 5 May 2025 01:04:56 +0100 Subject: [PATCH] Update GitHub token input to require CUSTOM_GH_TOKEN for authentication in workflows --- .github/actions/runner-fallback/action.yml | 5 +++-- .github/workflows/docs-and-testcov.yml | 2 +- .github/workflows/run-benchmarks.yml | 2 +- .github/workflows/run-unit-tests.yml | 6 +++++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/actions/runner-fallback/action.yml b/.github/actions/runner-fallback/action.yml index ea0b805..31bb0fe 100644 --- a/.github/actions/runner-fallback/action.yml +++ b/.github/actions/runner-fallback/action.yml @@ -12,8 +12,9 @@ inputs: required: true github-token: description: 'GitHub token with repo admin read permissions' - required: false - default: ${{ secrets.CUSTOM_GH_TOKEN }} + required: true + + outputs: use-runner: diff --git a/.github/workflows/docs-and-testcov.yml b/.github/workflows/docs-and-testcov.yml index 6fa7bb4..346335f 100644 --- a/.github/workflows/docs-and-testcov.yml +++ b/.github/workflows/docs-and-testcov.yml @@ -29,7 +29,7 @@ jobs: with: primary-runner: "self-hosted" fallback-runner: "ubuntu-latest" - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.CUSTOM_GH_TOKEN }} docs-and-testcov: needs: pick-runner diff --git a/.github/workflows/run-benchmarks.yml b/.github/workflows/run-benchmarks.yml index 86e3c69..a7c3044 100644 --- a/.github/workflows/run-benchmarks.yml +++ b/.github/workflows/run-benchmarks.yml @@ -18,7 +18,7 @@ jobs: with: primary-runner: "self-hosted" fallback-runner: "ubuntu-latest" - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.CUSTOM_GH_TOKEN }} run-benchmarks: needs: pick-runner diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml index dfc743b..1aa68c5 100644 --- a/.github/workflows/run-unit-tests.yml +++ b/.github/workflows/run-unit-tests.yml @@ -12,18 +12,22 @@ concurrency: jobs: pick-runner: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest outputs: runner: ${{ steps.choose.outputs.use-runner }} steps: + - uses: actions/checkout@v4 - id: choose uses: ./.github/actions/runner-fallback with: primary-runner: "self-hosted" fallback-runner: "ubuntu-latest" - github-token: ${{ secrets.GITHUB_TOKEN }} + github-token: ${{ secrets.CUSTOM_GH_TOKEN }} + run-unit-tests: needs: pick-runner