Skip to content

fix: upgrade gittools/actions to v3.2.1 to support GitVersion 6.x

Placeholder Copilot requested to merge copilot/update-gitversion-to-v321 into main

gittools/actions@v3.1.11 enforces a version range of >=5.2.0 <6.1.0, but versionSpec: '6.x' now resolves to 6.7.0, breaking the "Install GitVersion" step in the Build API Docker workflow.

Changes

  • .github/workflows/build-api-docker.yml: Bump both gittools/actions/gitversion/setup and gittools/actions/gitversion/execute from v3.1.11 → v3.2.1, which lifts the upper bound and supports GitVersion 6.x
- uses: gittools/actions/gitversion/setup@v3.2.1
  with:
    versionSpec: '6.x'

- uses: gittools/actions/gitversion/execute@v3.2.1

versionSpec: '6.x' is unchanged.

Original prompt

Problem

The "Build API Docker" workflow is failing at the "Install GitVersion" step because gittools/actions/gitversion/setup@v3.1.11 only supports GitVersion tool versions in the range >=5.2.0 <6.1.0, but versionSpec: '6.x' now resolves to 6.7.0, which is outside that range.

Error from logs:

Version spec '6.x' resolved as '6.7.0' does not satisfy the range '>=5.2.0 <6.1.0'.

Solution (Option 1)

In .github/workflows/build-api-docker.yml, upgrade both gittools/actions references from v3.1.11 to v3.2.1 (the latest v3.x release which supports GitVersion 6.x):

  • Line 31: Change uses: gittools/actions/gitversion/setup@v3.1.11 → uses: gittools/actions/gitversion/setup@v3.2.1
  • Line 37: Change uses: gittools/actions/gitversion/execute@v3.1.11 → uses: gittools/actions/gitversion/execute@v3.2.1

Keep versionSpec: '6.x' unchanged — the newer action version supports it.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.

Assistant:

I'll start by fetching the job logs and the workflow definition to understand the failure.

Assistant:

Failing Job Analysis

The error is clear from the logs:

Version spec '6.x' resolved as '6.7.0' does not satisfy the range '>=5.2.0 <6.1.0'.

The gittools/actions/gitversion/setup@v3.1.11 action you're using only supports GitVersion tool versions in the range >=5.2.0 <6.1.0, but the versionSpec: '6.x' resolves to 6.7.0, which is outside that range.

Solution

You have two options:

Option 1 (Recommended): Update the GitTools actions to a newer version that supports GitVersion 6.7.0

In .github/workflows/build-api-docker.yml, update both action references from v3.1.11 to v3.2.11 (or the latest v3 tag), which supports the 6.x range:

      - name: Install GitVersion
        uses: gittools/actions/gitversion/setup@v3.2.11
        with:
          versionSpec: '6.x'

      - name: Run GitVersion
        id: gitversion
        uses: gittools/actions/gitversion/execute@v3.2.11

Check the GitTools actions releases for the latest compatible version that supports GitVersion >=6.1.0.

Option 2: Pin the GitVersion tool to a compatible version

If you'd rather not update the action, pin the versionSpec to a version within the supported range:

      - name: Install GitVersion
        uses: gittools/actions/gitversion/setup@v3.1.11
        with:
          versionSpec: '6.0.x'

This keeps the tool version within the >=5.2.0 <6.1.0 range that v3.1.11 of the action enforces.


Option 1 is recommended since it keeps you on the latest GitVersion tooling with bug fixes and features.

User: 帮我根据option1进行修改

Assistant: GitTools/actions 的最新 v3.x 版本是 v3.2.1,它支持 GitVersion 6.x。现在我来帮你创建 PR 进行修改。

Assistant: I'm waiting for your confirmation to proceed with creating the pull request. Please accept or reject the tool call in the dialog above so I can continue.

This pull request was created from Copilot chat.

Merge request reports

Loading