name: Runner Guard
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
assert-hosted-runners:
name: Assert all runners are GitHub-hosted
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 - name: Self-test the guard, then scan every workflow
run: |
python3 .github/scripts/assert_hosted_runners.py --selftest
python3 .github/scripts/assert_hosted_runners.py