From 6d0dafd396c4568da46d31bca1859e1c4e37d205 Mon Sep 17 00:00:00 2001 From: William So Date: Wed, 11 Feb 2026 10:59:25 +0800 Subject: [PATCH] ci: add job timeouts to workflows to limit Action minutes --- .github/workflows/check.yml | 4 ++++ .github/workflows/docker.yml | 2 ++ .github/workflows/release.yml | 2 ++ 3 files changed, 8 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 9442fc4..c7dd26c 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -17,6 +17,7 @@ jobs: # self-hosted. The job should fail if quota is exhausted. permissions: {} runs-on: ubuntu-slim + timeout-minutes: 1 steps: - name: Quota probe id: quota_probe @@ -36,6 +37,7 @@ jobs: needs: detect-quota if: ${{ always() }} runs-on: ${{ needs.detect-quota.result == 'success' && 'ubuntu-slim' || 'self-hosted' }} + timeout-minutes: 5 continue-on-error: true steps: - uses: actions/checkout@v4 @@ -65,6 +67,7 @@ jobs: needs: detect-quota if: ${{ always() }} runs-on: ${{ needs.detect-quota.result == 'success' && 'ubuntu-latest' || 'self-hosted' }} + timeout-minutes: 2 continue-on-error: true steps: - uses: actions/checkout@v4 @@ -76,6 +79,7 @@ jobs: needs: detect-quota if: ${{ always() }} runs-on: ${{ needs.detect-quota.result == 'success' && 'ubuntu-latest' || 'self-hosted' }} + timeout-minutes: 5 continue-on-error: true steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c0dfbe9..7174557 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,6 +22,7 @@ jobs: # try job. permissions: {} runs-on: ubuntu-slim + timeout-minutes: 1 steps: - name: Quota probe id: quota_probe @@ -40,6 +41,7 @@ jobs: needs: detect-quota if: ${{ always() }} runs-on: ${{ needs.detect-quota.result == 'success' && 'ubuntu-latest' || 'self-hosted' }} + timeout-minutes: 5 continue-on-error: true steps: - name: Setup QEMU diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3eb8045..3ea97fc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,7 @@ jobs: # back if necessary. permissions: {} runs-on: ubuntu-slim + timeout-minutes: 1 steps: - name: Quota probe id: quota_probe @@ -43,6 +44,7 @@ jobs: needs: detect-quota if: ${{ always() }} runs-on: ${{ needs.detect-quota.result == 'success' && 'ubuntu-latest' || 'self-hosted' }} + timeout-minutes: 5 continue-on-error: true steps: