Skip to content

Commit e46696e

Browse files
authoredFeb 28, 2025··
ci: Using fetch-depth when fetching tags (#7400)
Signed-off-by: Johan Fylling <[email protected]>
1 parent 85eaacd commit e46696e

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed
 

‎.github/workflows/post-merge.yaml

+8-2
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,12 @@ jobs:
9191
- name: Check out code
9292
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9393
with:
94+
fetch-depth: 0
9495
fetch-tags: true
9596

97+
- name: Git Describe
98+
run: git describe --tags
99+
96100
- name: Build Linux and Windows
97101
run: make ci-go-ci-build-linux ci-go-ci-build-linux-static ci-go-ci-build-windows
98102
timeout-minutes: 30
@@ -121,8 +125,12 @@ jobs:
121125
- name: Check out code
122126
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
123127
with:
128+
fetch-depth: 0
124129
fetch-tags: true
125130

131+
- name: Git Describe
132+
run: git describe --tags
133+
126134
- id: go_version
127135
name: Read go version
128136
run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT
@@ -154,8 +162,6 @@ jobs:
154162
steps:
155163
- name: Check out code
156164
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
157-
with:
158-
fetch-tags: true
159165

160166
- name: Test
161167
run: make ci-release-test

‎.github/workflows/post-tag.yaml

+8-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1515
with:
1616
token: ${{ secrets.GH_PUSH_TOKEN }}
17-
fetch-tags: true
1817

1918
- name: Generate
2019
run: make clean generate
@@ -27,8 +26,12 @@ jobs:
2726
- name: Check out code
2827
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2928
with:
29+
fetch-depth: 0
3030
fetch-tags: true
3131

32+
- name: Git Describe
33+
run: git describe --tags
34+
3235
- name: Build Linux and Windows
3336
run: make ci-go-ci-build-linux ci-go-ci-build-linux-static ci-go-ci-build-windows
3437
timeout-minutes: 30
@@ -57,8 +60,12 @@ jobs:
5760
- name: Check out code
5861
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5962
with:
63+
fetch-depth: 0
6064
fetch-tags: true
6165

66+
- name: Git Describe
67+
run: git describe --tags
68+
6269
- id: go_version
6370
name: Read go version
6471
run: echo "go_version=$(cat .go-version)" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)
Please sign in to comment.