ci: Move runner-timeout to composite action (#38503)

We are hitting the limit of 20 workflow references in servo. To help
mitigate this somewhat, we migrate the timeout job to a composite
action, which should be able to support our needs just as well.

Testing: [try run of this
PR](https://github.com/servo/servo/actions/runs/16783916103/job/47529580725).
[try run with unconditional
cancel](https://github.com/servo/servo/actions/runs/16784074213/job/47530099654).

This reduces our workflow count by one, slightly helping to address
#36143

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2025-08-07 07:13:36 +02:00 committed by GitHub
parent edf80576d5
commit c055e8b456
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 73 additions and 54 deletions

View file

@ -94,11 +94,18 @@ jobs:
runner-timeout:
needs:
- runner-select
uses: ./.github/workflows/self-hosted-runner-timeout.yml
secrets: inherit
with:
unique-id: ${{ needs.runner-select.outputs.unique-id }}
is-self-hosted: ${{ fromJSON(needs.runner-select.outputs.is-self-hosted) }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: '.github'
- name: Runner timeout
uses: ./.github/actions/runner-timeout
if: ${{ fromJSON(needs.runner-select.outputs.is-self-hosted) }}
with:
github_token: '${{ secrets.GITHUB_TOKEN }}'
unique-id: '${{ needs.runner-select.outputs.unique-id }}'
build:
needs: