From 5b40081db69164a49aa16c7f84c845039d5226b1 Mon Sep 17 00:00:00 2001 From: I313226 Date: Tue, 7 Jul 2026 00:22:00 +0200 Subject: [PATCH 1/3] fix(workflows): pass --timeout to golangci-lint to prevent exit code 4 Adds a timeout input (default: 10m) passed as --timeout=m to golangci-lint via the action's args field, fixing the "Timeout exceeded" error. No job-level timeout is set. Signed-off-by: I313226 --- .github/workflows/shared-go-lint.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/shared-go-lint.yaml b/.github/workflows/shared-go-lint.yaml index 8d6b8a0..11b8a8b 100644 --- a/.github/workflows/shared-go-lint.yaml +++ b/.github/workflows/shared-go-lint.yaml @@ -14,7 +14,7 @@ on: default: "latest" type: string timeout: - description: "Timeout in minutes for the lint job" + description: "Timeout in minutes passed to golangci-lint via --timeout" required: false default: 10 type: number @@ -37,7 +37,6 @@ on: jobs: lint: runs-on: ${{ inputs.runs-on }} - timeout-minutes: ${{ inputs.timeout }} permissions: contents: read defaults: @@ -59,6 +58,7 @@ jobs: with: version: ${{ inputs.golangci-lint-version }} working-directory: ${{ inputs.working-directory }} + args: --timeout=${{ inputs.timeout }}m - name: Run govulncheck if: inputs.enable-govulncheck == true From 02f6d11e5674301e64792ee26b69e2e09cc16859 Mon Sep 17 00:00:00 2001 From: I313226 Date: Tue, 7 Jul 2026 00:30:41 +0200 Subject: [PATCH 2/3] fix(workflows): validate timeout is a positive integer before running lint Signed-off-by: I313226 --- .github/workflows/shared-go-lint.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/shared-go-lint.yaml b/.github/workflows/shared-go-lint.yaml index 11b8a8b..5d922b2 100644 --- a/.github/workflows/shared-go-lint.yaml +++ b/.github/workflows/shared-go-lint.yaml @@ -43,6 +43,15 @@ jobs: run: working-directory: ${{ inputs.working-directory }} steps: + - name: Validate inputs + env: + TIMEOUT: ${{ inputs.timeout }} + run: | + if ! echo "$TIMEOUT" | grep -qE '^[1-9][0-9]*$'; then + echo "ERROR: timeout must be a positive integer (got: '$TIMEOUT')" + exit 1 + fi + - name: Checkout repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 From d9dbe19e7e22b42345a306678ca2595a89113ac6 Mon Sep 17 00:00:00 2001 From: I313226 Date: Tue, 7 Jul 2026 00:34:48 +0200 Subject: [PATCH 3/3] fix(workflows): add shell: bash to validate inputs step Signed-off-by: I313226 --- .github/workflows/shared-go-lint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/shared-go-lint.yaml b/.github/workflows/shared-go-lint.yaml index 5d922b2..3c06df3 100644 --- a/.github/workflows/shared-go-lint.yaml +++ b/.github/workflows/shared-go-lint.yaml @@ -44,6 +44,7 @@ jobs: working-directory: ${{ inputs.working-directory }} steps: - name: Validate inputs + shell: bash env: TIMEOUT: ${{ inputs.timeout }} run: |