From 39ff8438861057935fc65d10281bd34df4bb7a5e Mon Sep 17 00:00:00 2001 From: Jose Palomares Date: Mon, 25 May 2026 13:20:37 +0200 Subject: [PATCH 1/2] feat: INF-3764 add default timouts overwritable with input --- .github/workflows/build-image.yaml | 8 ++++++++ .github/workflows/ci-requirements.yaml | 6 ++++++ .github/workflows/ci.pr.yaml | 1 + .github/workflows/ci.update-major-version-tag.yaml | 1 + .github/workflows/container.yaml | 6 ++++++ .github/workflows/deployment.yaml | 6 ++++++ .github/workflows/docs.yaml | 6 ++++++ .github/workflows/js.yaml | 6 ++++++ .github/workflows/json.yaml | 6 ++++++ .github/workflows/kubernetes.yaml | 8 ++++++++ .github/workflows/npm.yaml | 6 ++++++ .github/workflows/pr.yaml | 7 +++++++ .github/workflows/preview.build-image.yaml | 7 +++++++ .github/workflows/preview.remove-tag.yaml | 6 ++++++ .github/workflows/python.yaml | 6 ++++++ .github/workflows/release.yaml | 6 ++++++ .github/workflows/shell.yaml | 6 ++++++ .github/workflows/terraform.yaml | 6 ++++++ .github/workflows/yaml.yaml | 6 ++++++ 19 files changed, 110 insertions(+) diff --git a/.github/workflows/build-image.yaml b/.github/workflows/build-image.yaml index 3832625..fa1346c 100644 --- a/.github/workflows/build-image.yaml +++ b/.github/workflows/build-image.yaml @@ -37,6 +37,11 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number version: required: true type: string @@ -82,6 +87,7 @@ jobs: contents: read environment: ${{ github.event.deployment.payload.env || inputs.env }} runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Checkout current git repository uses: actions/checkout@v6 @@ -166,6 +172,7 @@ jobs: contents: read environment: ${{ github.event.deployment.payload.env || inputs.env }} runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} strategy: matrix: containerfile_targets: ${{ fromJson(inputs.imageTargets) }} @@ -254,6 +261,7 @@ jobs: contents: read environment: ${{ github.event.deployment.payload.env || inputs.env }} runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Checkout current git repository uses: actions/checkout@v6 diff --git a/.github/workflows/ci-requirements.yaml b/.github/workflows/ci-requirements.yaml index bc07233..80bd446 100644 --- a/.github/workflows/ci-requirements.yaml +++ b/.github/workflows/ci-requirements.yaml @@ -10,6 +10,11 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number outputs: full_run_required: description: Whether a full pipeline run is required @@ -20,6 +25,7 @@ on: jobs: requirements: runs-on: ${{ inputs.runner || 'ubuntu-latest' }} + timeout-minutes: ${{ inputs.timeoutMinutes || 40 }} outputs: full_run_required: ${{ steps.check_full_run_required.outputs.full_run_required }} test_run_required: ${{ steps.check_test_run_required.outputs.test_run_required }} diff --git a/.github/workflows/ci.pr.yaml b/.github/workflows/ci.pr.yaml index 2783c59..b1729d3 100644 --- a/.github/workflows/ci.pr.yaml +++ b/.github/workflows/ci.pr.yaml @@ -14,6 +14,7 @@ jobs: repoAccessToken: ${{ secrets.GITHUB_TOKEN }} actionlint: runs-on: ubuntu-latest + timeout-minutes: 40 steps: - name: Checkout current git repository uses: actions/checkout@v6 diff --git a/.github/workflows/ci.update-major-version-tag.yaml b/.github/workflows/ci.update-major-version-tag.yaml index 0937716..e24735e 100644 --- a/.github/workflows/ci.update-major-version-tag.yaml +++ b/.github/workflows/ci.update-major-version-tag.yaml @@ -7,6 +7,7 @@ on: jobs: update-major-tag: runs-on: ubuntu-latest + timeout-minutes: 40 steps: - name: Checkout uses: actions/checkout@v6 diff --git a/.github/workflows/container.yaml b/.github/workflows/container.yaml index f12cb15..eacdef7 100644 --- a/.github/workflows/container.yaml +++ b/.github/workflows/container.yaml @@ -55,6 +55,11 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number version: required: true description: The version to push @@ -79,6 +84,7 @@ jobs: id-token: write contents: read runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Checkout current git repository uses: actions/checkout@v6 diff --git a/.github/workflows/deployment.yaml b/.github/workflows/deployment.yaml index 1711e8b..f0e97f3 100644 --- a/.github/workflows/deployment.yaml +++ b/.github/workflows/deployment.yaml @@ -44,6 +44,11 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number statusUrl: required: false description: The url that shows the status of the application @@ -62,6 +67,7 @@ on: jobs: kubernetes: runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Checkout current git repository uses: actions/checkout@v6 diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 1809925..18f6f47 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -27,6 +27,11 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number secrets: repoAccessToken: required: true @@ -35,6 +40,7 @@ jobs: jekyll: if: github.ref == 'refs/heads/${{ inputs.defaultBranch }}' runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Load workflow variables id: vars diff --git a/.github/workflows/js.yaml b/.github/workflows/js.yaml index 4df18a9..9448787 100644 --- a/.github/workflows/js.yaml +++ b/.github/workflows/js.yaml @@ -22,6 +22,11 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number secrets: npmGithubReadToken: required: true @@ -29,6 +34,7 @@ on: jobs: js: runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Checkout current git repository uses: actions/checkout@v6 diff --git a/.github/workflows/json.yaml b/.github/workflows/json.yaml index 4e65153..9a755c6 100644 --- a/.github/workflows/json.yaml +++ b/.github/workflows/json.yaml @@ -7,9 +7,15 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number jobs: json: runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Checkout current git repository uses: actions/checkout@v6 diff --git a/.github/workflows/kubernetes.yaml b/.github/workflows/kubernetes.yaml index 218fa9e..7702980 100644 --- a/.github/workflows/kubernetes.yaml +++ b/.github/workflows/kubernetes.yaml @@ -62,6 +62,11 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number sentryOrg: required: false description: The Sentry organization that will hold the deployment @@ -163,6 +168,7 @@ jobs: initialize: environment: ${{ github.event.deployment.payload.env || inputs.env }} runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} outputs: channel-id: ${{ steps.vars.outputs.channel-id }} version: ${{ steps.vars.outputs.version }} @@ -219,6 +225,7 @@ jobs: preScript: ${{ inputs.preScript }} enableContainerScan: ${{ inputs.enableContainerScan }} runner: ${{ inputs.runner }} + timeoutMinutes: ${{ inputs.timeoutMinutes }} version: ${{ needs.initialize.outputs.version }} appName: ${{ github.event.deployment.payload.name || inputs.appName }} env: ${{ github.event.deployment.payload.env || inputs.env }} @@ -233,6 +240,7 @@ jobs: environment: ${{ github.event.deployment.payload.env || inputs.env }} concurrency: commit-${{ inputs.deploymentRepoURL }}-${{ github.sha }} runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Checkout ${{ inputs.deploymentRepoURL }} git repository uses: actions/checkout@v6 diff --git a/.github/workflows/npm.yaml b/.github/workflows/npm.yaml index 73cdb4e..3147e1b 100644 --- a/.github/workflows/npm.yaml +++ b/.github/workflows/npm.yaml @@ -42,6 +42,11 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number scope: required: false description: The npm organization (defaults to @parcellab) @@ -61,6 +66,7 @@ on: jobs: npm-publish: runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Checkout current git repository uses: actions/checkout@v6 diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 42a867d..db10519 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -12,6 +12,11 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number secrets: repoAccessToken: required: true @@ -22,6 +27,7 @@ jobs: contents: read pull-requests: write runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Checkout uses: actions/checkout@v6 @@ -35,6 +41,7 @@ jobs: validate_title: name: Validate PR title runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - uses: amannn/action-semantic-pull-request@v6.1.1 env: diff --git a/.github/workflows/preview.build-image.yaml b/.github/workflows/preview.build-image.yaml index c21a862..a538d2c 100644 --- a/.github/workflows/preview.build-image.yaml +++ b/.github/workflows/preview.build-image.yaml @@ -25,6 +25,11 @@ on: description: If provided, downloads a previously uploaded artifact (has to be in the same workflow). Both artifactPath and artifactName have to be passed. default: "" type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number secrets: AWS_ROLE_TO_ASSUME: required: true @@ -36,6 +41,7 @@ jobs: id-token: write contents: read runs-on: ubuntu-latest + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Checkout current git repository uses: actions/checkout@v6 @@ -86,6 +92,7 @@ jobs: comment-pr: if: ${{ inputs.GHA_TRIGGER_EVENT != 'synchronize' }} runs-on: ubuntu-latest + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Comment PR uses: thollander/actions-comment-pull-request@v3 diff --git a/.github/workflows/preview.remove-tag.yaml b/.github/workflows/preview.remove-tag.yaml index 5cab0e5..b550b58 100644 --- a/.github/workflows/preview.remove-tag.yaml +++ b/.github/workflows/preview.remove-tag.yaml @@ -7,6 +7,11 @@ on: description: The name of the application required: true type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number secrets: AWS_ROLE_TO_ASSUME: required: true @@ -18,6 +23,7 @@ jobs: id-token: write contents: read runs-on: ubuntu-latest + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v6 diff --git a/.github/workflows/python.yaml b/.github/workflows/python.yaml index ecd8a78..ee67e4b 100644 --- a/.github/workflows/python.yaml +++ b/.github/workflows/python.yaml @@ -12,9 +12,15 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number jobs: python: runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Checkout current git repository uses: actions/checkout@v6 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 5d39ad6..86964a7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -7,6 +7,11 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number configName: required: false description: The path within the .github/ folder for the release drafter configuration @@ -63,6 +68,7 @@ on: jobs: release: runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Create/Update Release Draft uses: release-drafter/release-drafter@v7 diff --git a/.github/workflows/shell.yaml b/.github/workflows/shell.yaml index 2400e9a..5bdfb35 100644 --- a/.github/workflows/shell.yaml +++ b/.github/workflows/shell.yaml @@ -11,9 +11,15 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number jobs: shell: runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} container: koalaman/shellcheck-alpine:v0.9.0 steps: - name: Checkout git repository diff --git a/.github/workflows/terraform.yaml b/.github/workflows/terraform.yaml index f82fb97..55c5e06 100644 --- a/.github/workflows/terraform.yaml +++ b/.github/workflows/terraform.yaml @@ -7,6 +7,11 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number tflintConfigPath: required: false description: The path to the tflint configuration @@ -19,6 +24,7 @@ on: jobs: tf: runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Checkout current git repository uses: actions/checkout@v6 diff --git a/.github/workflows/yaml.yaml b/.github/workflows/yaml.yaml index cdd7cb6..5bddac5 100644 --- a/.github/workflows/yaml.yaml +++ b/.github/workflows/yaml.yaml @@ -7,6 +7,11 @@ on: description: Runner type default: ubuntu-latest type: string + timeoutMinutes: + required: false + description: Maximum minutes before the job is cancelled + default: 40 + type: number additional_args: required: false description: List of yaml files to exclude @@ -14,6 +19,7 @@ on: jobs: yaml: runs-on: ${{ inputs.runner }} + timeout-minutes: ${{ inputs.timeoutMinutes }} steps: - name: Checkout current git repository uses: actions/checkout@v6 From 4d44062aabea6f33ee4d0e4655d0eb5465b788f8 Mon Sep 17 00:00:00 2001 From: Jose Palomares Date: Tue, 26 May 2026 09:54:30 +0200 Subject: [PATCH 2/2] feat: removing hard-coded timeout for internal CIs --- .github/workflows/ci.pr.yaml | 1 - .github/workflows/ci.update-major-version-tag.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/ci.pr.yaml b/.github/workflows/ci.pr.yaml index b1729d3..2783c59 100644 --- a/.github/workflows/ci.pr.yaml +++ b/.github/workflows/ci.pr.yaml @@ -14,7 +14,6 @@ jobs: repoAccessToken: ${{ secrets.GITHUB_TOKEN }} actionlint: runs-on: ubuntu-latest - timeout-minutes: 40 steps: - name: Checkout current git repository uses: actions/checkout@v6 diff --git a/.github/workflows/ci.update-major-version-tag.yaml b/.github/workflows/ci.update-major-version-tag.yaml index e24735e..0937716 100644 --- a/.github/workflows/ci.update-major-version-tag.yaml +++ b/.github/workflows/ci.update-major-version-tag.yaml @@ -7,7 +7,6 @@ on: jobs: update-major-tag: runs-on: ubuntu-latest - timeout-minutes: 40 steps: - name: Checkout uses: actions/checkout@v6