From dfb7340ae0b32dfed56afb54fe5010c7096a952e Mon Sep 17 00:00:00 2001 From: not-matthias Date: Fri, 23 Jan 2026 15:20:08 +0100 Subject: [PATCH] feat: support pinning the codspeed-go-runner --- .github/workflows/ci.yml | 24 +++++++++++++++++++++++- README.md | 4 ++++ action.yml | 7 +++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f340dec..af69b24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -68,7 +68,8 @@ jobs: echo "Working"; echo "with"; echo "multiple lines"; - test-version-formats: + + test-runner-version-formats: strategy: fail-fast: false matrix: @@ -89,3 +90,24 @@ jobs: runner-version: ${{ matrix.version }} mode: simulation run: echo "Testing version format ${{ matrix.version }}!" + + test-go-runner-version-formats: + strategy: + fail-fast: false + matrix: + version: + - "1.0.0" + - "1.0.0-beta.1" + + runs-on: ubuntu-latest + env: + CODSPEED_SKIP_UPLOAD: true + steps: + - uses: actions/checkout@v4 + - name: Check action with version format ${{ matrix.version }} + uses: ./ + with: + allow-empty: true + go-runner-version: ${{ matrix.version }} + mode: walltime + run: echo "Testing version format ${{ matrix.version }}!" diff --git a/README.md b/README.md index fda6aec..dda0933 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,10 @@ GitHub Actions for running [CodSpeed](https://codspeed.io) in your CI. # [OPTIONAL] # A custom upload url, only if you are using an on premise CodSpeed instance upload-url: "" + + # [OPTIONAL] + # The version of the go-runner to use (e.g., 1.0.0, 1.0.0-beta.1). If not specified, the latest version will be installed + go-runner-version: "" ``` # Example usage diff --git a/action.yml b/action.yml index 346d829..0ee33d7 100644 --- a/action.yml +++ b/action.yml @@ -73,6 +73,10 @@ inputs: required: false default: "false" + go-runner-version: + description: "The version of the go-runner to use (e.g., 1.0.0, 1.0.0-beta.1). If not specified, the latest version will be installed" + required: false + runs: using: "composite" steps: @@ -182,6 +186,9 @@ runs: if [ "${{ inputs.allow-empty }}" = "true" ]; then RUNNER_ARGS="$RUNNER_ARGS --allow-empty" fi + if [ -n "${{ inputs.go-runner-version }}" ]; then + RUNNER_ARGS="$RUNNER_ARGS --go-runner-version=${{ inputs.go-runner-version }}" + fi # Run the benchmarks codspeed run $RUNNER_ARGS -- '${{ inputs.run }}'