diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 2b560045..7eface27 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -6,10 +6,15 @@ on: - main pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: security-scan-source: name: Security Scan - Source Code & Dependencies runs-on: ubuntu-latest + timeout-minutes: 60 if: github.event_name == 'pull_request' steps: - name: Check out code @@ -58,6 +63,7 @@ jobs: build: runs-on: ${{ matrix.runner }} + timeout-minutes: 60 strategy: matrix: include: @@ -169,6 +175,7 @@ jobs: manifest: runs-on: ubuntu-latest + timeout-minutes: 60 needs: build if: startsWith(github.ref, 'refs/tags') steps: @@ -224,6 +231,7 @@ jobs: contents: write name: Generate Security Badge runs-on: ubuntu-latest + timeout-minutes: 60 needs: - build if: github.ref == 'refs/heads/main' && github.event_name == 'push' diff --git a/.github/workflows/linked-issue-to-pr-management.yml b/.github/workflows/linked-issue-to-pr-management.yml index 25206f8d..47c8dcaa 100644 --- a/.github/workflows/linked-issue-to-pr-management.yml +++ b/.github/workflows/linked-issue-to-pr-management.yml @@ -6,23 +6,26 @@ on: issues: types: [opened, labeled] -jobs: - handle-issue: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.event.issue.number || github.ref }} + cancel-in-progress: true + +jobs: + handle-issue: if: github.event_name == 'issues' - permissions: + uses: krkn-chaos/actions/.github/workflows/linked-issue-to-pr-management.yml@main + permissions: issues: write contents: read pull-requests: write secrets: ISSUE_PR_CLASSIC: ${{ secrets.ISSUE_PR_CLASSIC }} - uses: krkn-chaos/actions/.github/workflows/linked-issue-to-pr-management.yml@main - handle-pr: + handle-pr: if: github.event_name == 'pull_request_target' - permissions: + uses: krkn-chaos/actions/.github/workflows/linked-issue-to-pr-management.yml@main + permissions: issues: write contents: read pull-requests: write secrets: ISSUE_PR_CLASSIC: ${{ secrets.ISSUE_PR_CLASSIC }} - uses: krkn-chaos/actions/.github/workflows/linked-issue-to-pr-management.yml@main - diff --git a/.github/workflows/needs-rebase.yml b/.github/workflows/needs-rebase.yml index 76f4f057..6cbf60a9 100644 --- a/.github/workflows/needs-rebase.yml +++ b/.github/workflows/needs-rebase.yml @@ -6,6 +6,10 @@ on: push: branches: [main] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: pull-requests: write issues: write diff --git a/.github/workflows/pr-size-labeler.yml b/.github/workflows/pr-size-labeler.yml index bea2749f..39101247 100644 --- a/.github/workflows/pr-size-labeler.yml +++ b/.github/workflows/pr-size-labeler.yml @@ -4,6 +4,10 @@ on: pull_request_target: types: [opened, synchronize, reopened, edited] +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: pull-requests: write issues: write @@ -12,6 +16,7 @@ permissions: jobs: size-label: runs-on: ubuntu-latest + timeout-minutes: 60 steps: - name: Label PR by size uses: codelytv/pr-size-labeler@095a41fca88b8764fd9e008ad269bcdb82bb38b9 # v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 891ecef9..7d0331f8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,6 +12,7 @@ jobs: contents: write id-token: write runs-on: ubuntu-latest + timeout-minutes: 60 steps: - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 - name: calculate previous tag diff --git a/.github/workflows/require-docs.yml b/.github/workflows/require-docs.yml index e2ba24bc..48cac747 100644 --- a/.github/workflows/require-docs.yml +++ b/.github/workflows/require-docs.yml @@ -4,10 +4,16 @@ on: types: [opened, edited, synchronize] branches: - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: check-docs: name: Check Documentation Update runs-on: ubuntu-latest + timeout-minutes: 60 steps: - name: Check if Documentation is Required id: check_docs diff --git a/.github/workflows/scorecard-analysis.yml b/.github/workflows/scorecard-analysis.yml index 1b1eb69b..fd4b9a74 100644 --- a/.github/workflows/scorecard-analysis.yml +++ b/.github/workflows/scorecard-analysis.yml @@ -9,12 +9,17 @@ on: schedule: - cron: "30 19 * * *" +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + permissions: read-all jobs: analysis: name: Scorecard analysis runs-on: ubuntu-latest + timeout-minutes: 60 # `publish_results: true` only works when run from the default branch. conditional can be removed if disabled. if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request' diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 23879335..6c963569 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -6,6 +6,10 @@ on: - cron: "0 1 * * *" workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: issues: write pull-requests: write diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3bce30ef..8c63f714 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,11 +4,17 @@ on: push: branches: - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: tests: # Common steps name: Functional & Unit Tests runs-on: ubuntu-latest + timeout-minutes: 60 steps: - name: Check out code uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 @@ -171,6 +177,7 @@ jobs: contents: write name: Generate Coverage Badge runs-on: ubuntu-latest + timeout-minutes: 60 needs: - tests if: github.ref == 'refs/heads/main' && github.event_name == 'push' diff --git a/.github/workflows/tests_v2.yml b/.github/workflows/tests_v2.yml index 4b61c6ee..56096967 100644 --- a/.github/workflows/tests_v2.yml +++ b/.github/workflows/tests_v2.yml @@ -4,10 +4,16 @@ on: push: branches: - main + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: tests-v2: name: Tests v2 (pytest functional) runs-on: ubuntu-latest + timeout-minutes: 60 steps: - name: Check out code uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3