From 4a7840692507d62eb33d271266673bd89b68210a Mon Sep 17 00:00:00 2001 From: PN Scripts Date: Sun, 8 Nov 2026 23:08:50 +0200 Subject: [PATCH] CI: timeout per job, checkout without a stored token Every job stops after 10 minutes (runs take under 40 seconds), not after GitHub's default 6 hours, and actions/checkout keeps no token in .git/config because no job pushes. Actions stay pinned to commit hashes. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e939563..2e3d549 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,8 @@ jobs: tests: name: Tests (PHP ${{ matrix.php }}) runs-on: ubuntu-latest + # A hung step (network, installer) stops here, not after GitHub's 6 hours. + timeout-minutes: 10 strategy: fail-fast: false matrix: @@ -27,6 +29,9 @@ jobs: steps: # Actions are pinned to commit hashes, so a moved tag cannot change what runs here. - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + # Nothing here pushes, so the token is not kept in .git/config. + persist-credentials: false - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 with: php-version: ${{ matrix.php }} @@ -43,12 +48,15 @@ jobs: syntax: name: PHP ${{ matrix.php }} syntax runs-on: ubuntu-latest + timeout-minutes: 10 strategy: fail-fast: false matrix: php: ['8.1', '8.2'] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 with: php-version: ${{ matrix.php }}