diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index 70b45e2..6b756c3 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -30,9 +30,12 @@ on: concurrency: group: python-${{ github.ref }} cancel-in-progress: true +permissions: + contents: read jobs: test: - runs-on: ${{ vars.RUNNER_LABEL == 'netcup' && fromJSON('["self-hosted","netcup"]') || 'ubuntu-latest' }} + # A fork's PR never runs on the self-hosted runner: its code would run on our own host. + runs-on: ${{ vars.RUNNER_LABEL == 'netcup' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) && fromJSON('["self-hosted","netcup"]') || 'ubuntu-latest' }} steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 27e3106..7a276a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,8 @@ on: push: tags: ["v*"] workflow_dispatch: # cut-release.yml dispatches it on the tag it made: its token's tag push starts nothing +permissions: + contents: read concurrency: group: release cancel-in-progress: false diff --git a/.github/workflows/worker.yml b/.github/workflows/worker.yml index dea516a..bd9e31a 100644 --- a/.github/workflows/worker.yml +++ b/.github/workflows/worker.yml @@ -6,6 +6,8 @@ on: branches: [main] paths: ["worker/**", ".github/workflows/worker.yml"] workflow_call: +permissions: + contents: read jobs: test: runs-on: ubuntu-latest