Skip to content

Commit 1cd113f

Browse files
authored
Update Snippets 5000 workflow configuration (#12786)
1 parent ba639d2 commit 1cd113f

1 file changed

Lines changed: 17 additions & 8 deletions

File tree

.github/workflows/snippets5000.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,35 @@ on:
1414
default: 'Manual run'
1515

1616
env:
17-
DOTNET_VERSION: '9.0.*'
17+
DOTNET_VERSION: '11.0.*'
1818
DOTNET_QUALITY: 'preview'
1919
DOTNET_DO_INSTALL: 'true' # To install a version of .NET not provided by the runner, set to true
2020
EnableNuGetPackageRestore: 'True'
2121

22+
permissions:
23+
contents: read
24+
2225
jobs:
2326
snippets-build:
2427
runs-on: windows-2022
2528
permissions:
26-
statuses: write
29+
contents: read
30+
statuses: write
2731

2832
steps:
29-
# Check out the repository for the PR
30-
- name: Check out repository
31-
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b #@v4.1.5
33+
# Checkout the repository for the PR
34+
- name: Harden Runner
35+
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
36+
with:
37+
egress-policy: audit
38+
39+
- name: Checkout repository
40+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #@v7.0.0
3241

3342
# Get the latest preview SDK (or sdk not installed by the runner)
34-
- name: Set up .NET SDK
43+
- name: Set up .NET
3544
if: ${{ env.DOTNET_DO_INSTALL == 'true' }}
36-
uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 #@4.0.0
45+
uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 #@5.3.0
3746
with:
3847
dotnet-version: ${{ env.DOTNET_VERSION }}
3948
dotnet-quality: ${{ env.DOTNET_QUALITY }}
@@ -46,7 +55,7 @@ jobs:
4655
# Clone docs-tools repo
4756
- name: Clone docs-tools repository
4857
run: |
49-
git clone https://github.com/dotnet/docs-tools
58+
git clone --depth 1 https://github.com/dotnet/docs-tools
5059
5160
# Run snippets 5000
5261
- name: Run snippets 5000 for PR

0 commit comments

Comments
 (0)