Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,19 @@ on:
required: false
type: string
default: "[]"
lint_versions:
description: 'List of Go versions to lint against, in a JSON array (e.g. ["1.25"]). If empty, uses the same versions as the other jobs.'
required: false
type: string
default: ""

jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
go-versions: ${{ steps.versions.outputs.matrix }}
lint-versions: ${{ steps.versions.outputs.lint_matrix }}
steps:
- id: versions
run: |
Expand All @@ -26,6 +32,14 @@ jobs:

echo "matrix=$filtered" >> $GITHUB_OUTPUT

# Use lint-specific versions if provided, otherwise fall back to the filtered matrix
lint_override='${{ inputs.lint_versions }}'
if [ -n "$lint_override" ]; then
echo "lint_matrix=$lint_override" >> $GITHUB_OUTPUT
else
echo "lint_matrix=$filtered" >> $GITHUB_OUTPUT
fi

build:
name: Build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -57,7 +71,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: ${{ fromJSON(needs.setup.outputs.go-versions) }}
version: ${{ fromJSON(needs.setup.outputs.lint-versions) }}
steps:
- name: Check out source code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
Expand Down