Skip to content

Commit 6aa2284

Browse files
committed
fetch tags before building
1 parent 2f09500 commit 6aa2284

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/ci-cd.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ jobs:
4545
run: |
4646
git config --global user.email "[email protected]"
4747
git config --global user.name "Dummy User"
48+
- name: Unset header
49+
# checkout@v2 adds a header that makes branch protection report errors
50+
# because the Github action bot is not a collaborator on the repo
51+
run: git config --local --unset http.https://github.com/.extraheader
52+
- name: Fetch tags
53+
run: git fetch --prune --unshallow
4854
- name: install dependencies
4955
run: |
5056
sudo apt-get update
@@ -253,6 +259,12 @@ jobs:
253259
with:
254260
submodules: recursive
255261
fetch-depth: 0
262+
- name: Unset header
263+
# checkout@v2 adds a header that makes branch protection report errors
264+
# because the Github action bot is not a collaborator on the repo
265+
run: git config --local --unset http.https://github.com/.extraheader
266+
- name: Fetch tags
267+
run: git fetch --prune --unshallow
256268
- name: Set up Python
257269
uses: actions/setup-python@v4
258270
with:
@@ -285,6 +297,12 @@ jobs:
285297
with:
286298
submodules: recursive
287299
fetch-depth: 0
300+
- name: Unset header
301+
# checkout@v2 adds a header that makes branch protection report errors
302+
# because the Github action bot is not a collaborator on the repo
303+
run: git config --local --unset http.https://github.com/.extraheader
304+
- name: Fetch tags
305+
run: git fetch --prune --unshallow
288306
- name: Set up Python
289307
uses: actions/setup-python@v4
290308
with:
@@ -320,6 +338,12 @@ jobs:
320338
run: |
321339
git config --local user.email "[email protected]"
322340
git config --local user.name "GitHub Action"
341+
- name: Unset header
342+
# checkout@v2 adds a header that makes branch protection report errors
343+
# because the Github action bot is not a collaborator on the repo
344+
run: git config --local --unset http.https://github.com/.extraheader
345+
- name: Fetch tags
346+
run: git fetch --prune --unshallow
323347
- name: Download version file
324348
uses: actions/download-artifact@v3
325349
with:

0 commit comments

Comments
 (0)