Skip to content

Commit 4e1924d

Browse files
committed
workflows: update checkout actions
Remove fetch-depth from checkout actions, since that was required by Nerdbank.GitVersioning. Also take this opportunity to use consistent version and naming for checkout actions.
1 parent e54bd8f commit 4e1924d

File tree

5 files changed

+20
-47
lines changed

5 files changed

+20
-47
lines changed

.github/workflows/codeql-analysis.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ jobs:
2222
language: [ 'csharp' ]
2323

2424
steps:
25-
- name: Checkout repository
26-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
27-
with:
28-
fetch-depth: 0 # patch around Nerdbank.GitVersioning failure
25+
- uses: actions/checkout@v3
2926

3027
# Initializes the CodeQL tools for scanning.
3128
- name: Initialize CodeQL

.github/workflows/continuous-integration.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ jobs:
1717
os: [ubuntu-latest, windows-latest, macos-latest]
1818

1919
steps:
20-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
21-
with:
22-
fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works.
20+
- uses: actions/checkout@v3
2321

2422
- name: Setup .NET
2523
uses: actions/[email protected]

.github/workflows/lint-docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
name: Lint markdown files
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
21+
- uses: actions/checkout@v3
2222

2323
- uses: DavidAnson/markdownlint-cli2-action@cdfad95cc96588c74b62ad2d3f2e1772090099ac
2424
with:
@@ -30,7 +30,7 @@ jobs:
3030
name: Check for broken links
3131
runs-on: ubuntu-latest
3232
steps:
33-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
33+
- uses: actions/checkout@v3
3434

3535
- name: Run link checker
3636
# For any troubleshooting, see:

.github/workflows/release.yml

+11-33
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ jobs:
1414
matrix:
1515
runtime: [ osx-x64, osx-arm64 ]
1616
steps:
17-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
18-
with:
19-
fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works.
17+
- uses: actions/checkout@v3
2018

2119
- name: Set up dotnet
2220
uses: actions/[email protected]
@@ -77,8 +75,7 @@ jobs:
7775
runtime: [ osx-x64, osx-arm64 ]
7876
needs: osx-build
7977
steps:
80-
- name: Check out repository
81-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
78+
- uses: actions/checkout@v3
8279

8380
- name: Download payload
8481
uses: actions/download-artifact@v3
@@ -137,10 +134,7 @@ jobs:
137134
runtime: [ osx-x64, osx-arm64 ]
138135
needs: osx-payload-sign
139136
steps:
140-
- name: Check out repository
141-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
142-
with:
143-
fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works.
137+
- uses: actions/checkout@v3
144138

145139
- name: Set version environment variable
146140
run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
@@ -183,8 +177,7 @@ jobs:
183177
runtime: [ osx-x64, osx-arm64 ]
184178
needs: osx-pack
185179
steps:
186-
- name: Check out repository
187-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
180+
- uses: actions/checkout@v3
188181

189182
- name: Download unsigned package
190183
uses: actions/download-artifact@v3
@@ -250,9 +243,7 @@ jobs:
250243
name: Build and Sign Windows
251244
runs-on: windows-latest
252245
steps:
253-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
254-
with:
255-
fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works.
246+
- uses: actions/checkout@v3
256247

257248
- name: Set up dotnet
258249
uses: actions/[email protected]
@@ -353,9 +344,7 @@ jobs:
353344
name: Build Linux
354345
runs-on: ubuntu-latest
355346
steps:
356-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
357-
with:
358-
fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works.
347+
- uses: actions/checkout@v3
359348

360349
- name: Setup .NET
361350
uses: actions/[email protected]
@@ -387,7 +376,7 @@ jobs:
387376
# ESRP service requires signing to run on Windows
388377
runs-on: windows-latest
389378
steps:
390-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
379+
- uses: actions/checkout@v3
391380

392381
- name: Download artifacts
393382
uses: actions/download-artifact@v3
@@ -442,8 +431,6 @@ jobs:
442431
runs-on: ubuntu-latest
443432
steps:
444433
- uses: actions/checkout@v3
445-
with:
446-
fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works.
447434

448435
- name: Setup .NET
449436
uses: actions/[email protected]
@@ -467,8 +454,7 @@ jobs:
467454
runs-on: windows-latest
468455
needs: dotnet-tool-build
469456
steps:
470-
- name: Check out repository
471-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
457+
- uses: actions/checkout@v3
472458

473459
- name: Download payload
474460
uses: actions/download-artifact@v3
@@ -531,8 +517,6 @@ jobs:
531517
run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
532518

533519
- uses: actions/checkout@v3
534-
with:
535-
fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works.
536520

537521
- name: Download signed payload
538522
uses: actions/download-artifact@v3
@@ -563,8 +547,7 @@ jobs:
563547
runs-on: windows-latest
564548
needs: dotnet-tool-pack
565549
steps:
566-
- name: Check out repository
567-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
550+
- uses: actions/checkout@v3
568551

569552
- name: Download unsigned package
570553
uses: actions/download-artifact@v3
@@ -648,9 +631,7 @@ jobs:
648631
runs-on: ${{ matrix.component.os }}
649632
needs: [ osx-sign, win-sign, linux-sign, dotnet-tool-sign ]
650633
steps:
651-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
652-
with:
653-
fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works.
634+
- uses: actions/checkout@v3
654635

655636
- name: Download artifacts
656637
uses: actions/download-artifact@v3
@@ -711,10 +692,7 @@ jobs:
711692
runs-on: ubuntu-latest
712693
needs: [ validate ]
713694
steps:
714-
- name: Check out repository
715-
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
716-
with:
717-
fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works.
695+
- uses: actions/checkout@v3
718696

719697
- name: Set version environment variable
720698
run: |

.github/workflows/validate-install-from-source.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
zypper -n install tar gzip
3535
elif [[ ${{matrix.vector.image}} == *"centos"* ]]; then
3636
dnf install which -y
37-
fi
38-
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
39-
with:
40-
fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works.
37+
fi
38+
39+
- uses: actions/checkout@v3
40+
4141
- run: |
4242
sh "${GITHUB_WORKSPACE}/src/linux/Packaging.Linux/install-from-source.sh" -y
43-
git-credential-manager --help || exit 1
43+
git-credential-manager --help || exit 1

0 commit comments

Comments
 (0)