fix: upgrade gittools/actions to v3.2.1 to support GitVersion 6.x
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 bothgittools/actions/gitversion/setupandgittools/actions/gitversion/executefromv3.1.11→v3.2.1, which lifts the upper bound and supports GitVersion6.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.11only supports GitVersion tool versions in the range>=5.2.0 <6.1.0, butversionSpec: '6.x'now resolves to6.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 bothgittools/actionsreferences fromv3.1.11tov3.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.1Keep
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.11action you're using only supports GitVersion tool versions in the range>=5.2.0 <6.1.0, but theversionSpec: '6.x'resolves to6.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 fromv3.1.11tov3.2.11(or the latestv3tag), which supports the6.xrange:- 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.11Check 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
versionSpecto 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.0range thatv3.1.11of 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,它支持 GitVersion6.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.