Skip to content

Commit 9248c3d

Browse files
Bump actions/checkout from 5.0.0 to 5.0.1 (#3663)
1 parent 493702f commit 9248c3d

8 files changed

Lines changed: 103 additions & 103 deletions

File tree

.github/workflows/actions-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
steps:
3131

3232
- name: Checkout code
33-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
33+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
3434
with:
3535
filter: 'tree:0'
3636
persist-credentials: false

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
}
6666
6767
- name: Checkout code
68-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
68+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
6969
with:
7070
filter: 'tree:0'
7171
persist-credentials: false

.github/workflows/bump-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
steps:
2929

3030
- name: Checkout code
31-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
31+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
3232
with:
3333
filter: 'tree:0'
3434
persist-credentials: true # zizmor: ignore[artipacked] Needed to push commits

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
steps:
2525
- name: Checkout repository
26-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
2727
with:
2828
filter: 'tree:0'
2929
persist-credentials: false

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
steps:
1717

1818
- name: Checkout code
19-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
19+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
2020
with:
2121
filter: 'tree:0'
2222
persist-credentials: false

.github/workflows/ossf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
2424
with:
2525
filter: 'tree:0'
2626
persist-credentials: false

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
steps:
2727

2828
- name: Checkout code
29-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
3030
with:
3131
filter: 'tree:0'
3232
persist-credentials: false
Lines changed: 96 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,96 @@
1-
name: update-documentation
2-
3-
on:
4-
push:
5-
branches: [ master ]
6-
paths: [ '**/*.md', 'test/WebSites/DocumentationSnippets/**' ]
7-
workflow_dispatch:
8-
9-
permissions: {}
10-
11-
jobs:
12-
update-docs:
13-
name: update-docs
14-
runs-on: ubuntu-latest
15-
if: github.event.repository.fork == false
16-
17-
permissions:
18-
contents: write
19-
pull-requests: write
20-
21-
steps:
22-
23-
- name: Checkout code
24-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25-
with:
26-
filter: 'tree:0'
27-
persist-credentials: true # zizmor: ignore[artipacked] Needed to push commits
28-
show-progress: false
29-
30-
- name: Setup .NET SDK
31-
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
32-
33-
- name: Update documentation
34-
id: update-docs
35-
shell: pwsh
36-
env:
37-
DOTNET_CLI_TELEMETRY_OPTOUT: true
38-
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
39-
GIT_COMMIT_USER_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com'
40-
GIT_COMMIT_USER_NAME: 'github-actions[bot]'
41-
run: |
42-
$ErrorActionPreference = "Stop"
43-
$ProgressPreference = "SilentlyContinue"
44-
45-
dotnet tool restore
46-
dotnet mdsnippets
47-
48-
$GitStatus = (git status --porcelain)
49-
if ([string]::IsNullOrEmpty($GitStatus)) {
50-
Write-Output "No changes to commit."
51-
exit 0
52-
}
53-
54-
$BranchName = "docs/update-docs"
55-
"branchName=$BranchName" >> ${env:GITHUB_OUTPUT}
56-
57-
git config user.email ${env:GIT_COMMIT_USER_EMAIL} | Out-Null
58-
git config user.name ${env:GIT_COMMIT_USER_NAME} | Out-Null
59-
git remote set-url "${env:GITHUB_SERVER_URL}/${env:GITHUB_REPOSITORY}.git" | Out-Null
60-
git fetch origin | Out-Null
61-
git rev-parse --verify --quiet ("remotes/origin/" + $BranchName) | Out-Null
62-
63-
if ($LASTEXITCODE -eq 0) {
64-
Write-Output "Branch $BranchName already exists."
65-
exit 0
66-
}
67-
68-
git checkout -b $BranchName
69-
git add .
70-
git commit -m "Update the code-snippets in the documentation" -s
71-
git push -u origin $BranchName
72-
"updated-docs=true" >> ${env:GITHUB_OUTPUT}
73-
74-
- name: Create pull request
75-
if: steps.update-docs.outputs.updated-docs == 'true'
76-
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
77-
env:
78-
BASE_BRANCH_NAME: ${{ github.event.repository.default_branch }}
79-
HEAD_BRANCH_NAME: ${{ steps.update-docs.outputs.branchName }}
80-
with:
81-
script: |
82-
const { repo, owner } = context.repo;
83-
const workflowUrl = `${process.env.GITHUB_SERVER_URL}/${owner}/${repo}/actions/runs/${process.env.GITHUB_RUN_ID}`;
84-
const { data: pr } = await github.rest.pulls.create({
85-
title: 'Update the code-snippets in the documentation',
86-
owner,
87-
repo,
88-
head: process.env.HEAD_BRANCH_NAME,
89-
base: process.env.BASE_BRANCH_NAME,
90-
body: [
91-
'This PR updates the code-snippets in the documentation.',
92-
'',
93-
`This pull request was generated by [GitHub Actions](${workflowUrl}).`
94-
].join('\n')
95-
});
96-
core.notice(`Created pull request ${owner}/${repo}#${pr.number}: ${pr.html_url}`);
1+
name: update-documentation
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths: [ '**/*.md', 'test/WebSites/DocumentationSnippets/**' ]
7+
workflow_dispatch:
8+
9+
permissions: {}
10+
11+
jobs:
12+
update-docs:
13+
name: update-docs
14+
runs-on: ubuntu-latest
15+
if: github.event.repository.fork == false
16+
17+
permissions:
18+
contents: write
19+
pull-requests: write
20+
21+
steps:
22+
23+
- name: Checkout code
24+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
25+
with:
26+
filter: 'tree:0'
27+
persist-credentials: true # zizmor: ignore[artipacked] Needed to push commits
28+
show-progress: false
29+
30+
- name: Setup .NET SDK
31+
uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
32+
33+
- name: Update documentation
34+
id: update-docs
35+
shell: pwsh
36+
env:
37+
DOTNET_CLI_TELEMETRY_OPTOUT: true
38+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
39+
GIT_COMMIT_USER_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com'
40+
GIT_COMMIT_USER_NAME: 'github-actions[bot]'
41+
run: |
42+
$ErrorActionPreference = "Stop"
43+
$ProgressPreference = "SilentlyContinue"
44+
45+
dotnet tool restore
46+
dotnet mdsnippets
47+
48+
$GitStatus = (git status --porcelain)
49+
if ([string]::IsNullOrEmpty($GitStatus)) {
50+
Write-Output "No changes to commit."
51+
exit 0
52+
}
53+
54+
$BranchName = "docs/update-docs"
55+
"branchName=$BranchName" >> ${env:GITHUB_OUTPUT}
56+
57+
git config user.email ${env:GIT_COMMIT_USER_EMAIL} | Out-Null
58+
git config user.name ${env:GIT_COMMIT_USER_NAME} | Out-Null
59+
git remote set-url "${env:GITHUB_SERVER_URL}/${env:GITHUB_REPOSITORY}.git" | Out-Null
60+
git fetch origin | Out-Null
61+
git rev-parse --verify --quiet ("remotes/origin/" + $BranchName) | Out-Null
62+
63+
if ($LASTEXITCODE -eq 0) {
64+
Write-Output "Branch $BranchName already exists."
65+
exit 0
66+
}
67+
68+
git checkout -b $BranchName
69+
git add .
70+
git commit -m "Update the code-snippets in the documentation" -s
71+
git push -u origin $BranchName
72+
"updated-docs=true" >> ${env:GITHUB_OUTPUT}
73+
74+
- name: Create pull request
75+
if: steps.update-docs.outputs.updated-docs == 'true'
76+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
77+
env:
78+
BASE_BRANCH_NAME: ${{ github.event.repository.default_branch }}
79+
HEAD_BRANCH_NAME: ${{ steps.update-docs.outputs.branchName }}
80+
with:
81+
script: |
82+
const { repo, owner } = context.repo;
83+
const workflowUrl = `${process.env.GITHUB_SERVER_URL}/${owner}/${repo}/actions/runs/${process.env.GITHUB_RUN_ID}`;
84+
const { data: pr } = await github.rest.pulls.create({
85+
title: 'Update the code-snippets in the documentation',
86+
owner,
87+
repo,
88+
head: process.env.HEAD_BRANCH_NAME,
89+
base: process.env.BASE_BRANCH_NAME,
90+
body: [
91+
'This PR updates the code-snippets in the documentation.',
92+
'',
93+
`This pull request was generated by [GitHub Actions](${workflowUrl}).`
94+
].join('\n')
95+
});
96+
core.notice(`Created pull request ${owner}/${repo}#${pr.number}: ${pr.html_url}`);

0 commit comments

Comments
 (0)