Skip to content

Commit 1f44557

Browse files
authored
Merge branch 'main' into deji-issue-github#5849
2 parents edc8114 + 4ef7aeb commit 1f44557

File tree

43 files changed

+657
-615
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+657
-615
lines changed

content/actions/creating-actions/creating-a-composite-run-steps-action.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ jobs:
121121
runs-on: ubuntu-latest
122122
name: A job to say hello
123123
steps:
124-
- uses: actions/checkout@v2
125-
- id: foo
126-
uses: actions/hello-world-composite-run-steps-action@v1
127-
with:
128-
who-to-greet: 'Mona the Octocat'
129-
- run: echo random-number ${{ steps.foo.outputs.random-number }}
130-
shell: bash
124+
- uses: actions/checkout@v2
125+
- id: foo
126+
uses: actions/hello-world-composite-run-steps-action@v1
127+
with:
128+
who-to-greet: 'Mona the Octocat'
129+
- run: echo random-number ${{ steps.foo.outputs.random-number }}
130+
shell: bash
131131
```
132132
{% endraw %}
133133

content/actions/creating-actions/creating-a-docker-container-action.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -195,14 +195,14 @@ jobs:
195195
runs-on: ubuntu-latest
196196
name: A job to say hello
197197
steps:
198-
- name: Hello world action step
199-
id: hello
200-
uses: actions/hello-world-docker-action@v1
201-
with:
202-
who-to-greet: 'Mona the Octocat'
203-
# Use the output from the `hello` step
204-
- name: Get the output time
205-
run: echo "The time was ${{ steps.hello.outputs.time }}"
198+
- name: Hello world action step
199+
id: hello
200+
uses: actions/hello-world-docker-action@v1
201+
with:
202+
who-to-greet: 'Mona the Octocat'
203+
# Use the output from the `hello` step
204+
- name: Get the output time
205+
run: echo "The time was ${{ steps.hello.outputs.time }}"
206206
```
207207
{% endraw %}
208208

content/actions/creating-actions/creating-a-javascript-action.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,14 @@ jobs:
227227
runs-on: ubuntu-latest
228228
name: A job to say hello
229229
steps:
230-
- name: Hello world action step
231-
id: hello
232-
uses: actions/hello-world-javascript-action@v1.1
233-
with:
234-
who-to-greet: 'Mona the Octocat'
235-
# Use the output from the `hello` step
236-
- name: Get the output time
237-
run: echo "The time was ${{ steps.hello.outputs.time }}"
230+
- name: Hello world action step
231+
id: hello
232+
uses: actions/hello-world-javascript-action@v1.1
233+
with:
234+
who-to-greet: 'Mona the Octocat'
235+
# Use the output from the `hello` step
236+
- name: Get the output time
237+
run: echo "The time was ${{ steps.hello.outputs.time }}"
238238
```
239239
{% endraw %}
240240

content/actions/creating-actions/metadata-syntax-for-github-actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ runs:
296296
using: 'docker'
297297
image: 'Dockerfile'
298298
args:
299-
- 'bzz'
299+
- 'bzz'
300300
pre-entrypoint: 'setup.sh'
301301
entrypoint: 'main.sh'
302302
```
@@ -324,7 +324,7 @@ runs:
324324
using: 'docker'
325325
image: 'Dockerfile'
326326
args:
327-
- 'bzz'
327+
- 'bzz'
328328
entrypoint: 'main.sh'
329329
post-entrypoint: 'cleanup.sh'
330330
```

content/actions/guides/building-and-testing-net.md

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -47,17 +47,17 @@ jobs:
4747
dotnet-version: ['3.0', '3.1.x', '5.0.x' ]
4848

4949
steps:
50-
- uses: actions/checkout@v2
51-
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
52-
uses: actions/setup-dotnet@v1.7.2
53-
with:
54-
dotnet-version: ${{ matrix.dotnet-version }}
55-
- name: Install dependencies
56-
run: dotnet restore
57-
- name: Build
58-
run: dotnet build --configuration Release --no-restore
59-
- name: Test
60-
run: dotnet test --no-restore --verbosity normal
50+
- uses: actions/checkout@v2
51+
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
52+
uses: actions/setup-dotnet@v1.7.2
53+
with:
54+
dotnet-version: ${{ matrix.dotnet-version }}
55+
- name: Install dependencies
56+
run: dotnet restore
57+
- name: Build
58+
run: dotnet build --configuration Release --no-restore
59+
- name: Test
60+
run: dotnet test --no-restore --verbosity normal
6161
```
6262
{% endraw %}
6363
@@ -84,14 +84,14 @@ jobs:
8484
dotnet: [ '3.0', '3.1.x', '5.0.x' ]
8585
8686
steps:
87-
- uses: actions/checkout@v2
88-
- name: Setup dotnet ${{ matrix.dotnet-version }}
89-
uses: actions/setup-dotnet@v1
90-
with:
91-
dotnet-version: ${{ matrix.dotnet-version }}
92-
# You can test your matrix by printing the current dotnet version
93-
- name: Display dotnet version
94-
run: dotnet --version
87+
- uses: actions/checkout@v2
88+
- name: Setup dotnet ${{ matrix.dotnet-version }}
89+
uses: actions/setup-dotnet@v1
90+
with:
91+
dotnet-version: ${{ matrix.dotnet-version }}
92+
# You can test your matrix by printing the current dotnet version
93+
- name: Display dotnet version
94+
run: dotnet --version
9595
```
9696
{% endraw %}
9797

@@ -204,22 +204,22 @@ jobs:
204204
dotnet-version: [ '3.0', '3.1.x', '5.0.x' ]
205205
206206
steps:
207-
- uses: actions/checkout@v2
208-
- name: Setup dotnet
209-
uses: actions/setup-dotnet@v1
210-
with:
211-
dotnet-version: ${{ matrix.dotnet-version }}
212-
- name: Install dependencies
213-
run: dotnet restore
214-
- name: Test with dotnet
215-
run: dotnet test --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}"
216-
- name: Upload dotnet test results
217-
uses: actions/upload-artifact@v2
218-
with:
219-
name: dotnet-results-${{ matrix.dotnet-version }}
220-
path: TestResults-${{ matrix.dotnet-version }}
221-
# Use always() to always run this step to publish test results when there are test failures
222-
if: ${{ always() }}
207+
- uses: actions/checkout@v2
208+
- name: Setup dotnet
209+
uses: actions/setup-dotnet@v1
210+
with:
211+
dotnet-version: ${{ matrix.dotnet-version }}
212+
- name: Install dependencies
213+
run: dotnet restore
214+
- name: Test with dotnet
215+
run: dotnet test --logger trx --results-directory "TestResults-${{ matrix.dotnet-version }}"
216+
- name: Upload dotnet test results
217+
uses: actions/upload-artifact@v2
218+
with:
219+
name: dotnet-results-${{ matrix.dotnet-version }}
220+
path: TestResults-${{ matrix.dotnet-version }}
221+
# Use always() to always run this step to publish test results when there are test failures
222+
if: ${{ always() }}
223223
```
224224
{% endraw %}
225225

@@ -241,16 +241,16 @@ jobs:
241241
packages: write
242242
contents: read{% endif %}
243243
steps:
244-
- uses: actions/checkout@v2
245-
- uses: actions/setup-dotnet@v1
246-
with:
247-
dotnet-version: '3.1.x' # SDK Version to use.
248-
source-url: https://nuget.pkg.github.com/<owner>/index.json
249-
env:
250-
NUGET_AUTH_TOKEN: {% raw %}${{secrets.GITHUB_TOKEN}}{% endraw %}
251-
- run: dotnet build --configuration Release <my project>
252-
- name: Create the package
253-
run: dotnet pack --configuration Release <my project>
254-
- name: Publish the package to GPR
255-
run: dotnet nuget push <my project>/bin/Release/*.nupkg
244+
- uses: actions/checkout@v2
245+
- uses: actions/setup-dotnet@v1
246+
with:
247+
dotnet-version: '3.1.x' # SDK Version to use.
248+
source-url: https://nuget.pkg.github.com/<owner>/index.json
249+
env:
250+
NUGET_AUTH_TOKEN: {% raw %}${{secrets.GITHUB_TOKEN}}{% endraw %}
251+
- run: dotnet build --configuration Release <my project>
252+
- name: Create the package
253+
run: dotnet pack --configuration Release <my project>
254+
- name: Publish the package to GPR
255+
run: dotnet nuget push <my project>/bin/Release/*.nupkg
256256
```

content/actions/guides/building-and-testing-nodejs.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ jobs:
5959
node-version: [10.x, 12.x, 14.x, 15.x]
6060
6161
steps:
62-
- uses: actions/checkout@v2
63-
- name: Use Node.js ${{ matrix.node-version }}
64-
uses: actions/setup-node@v1
65-
with:
66-
node-version: ${{ matrix.node-version }}
67-
- run: npm ci
68-
- run: npm run build --if-present
69-
- run: npm test
62+
- uses: actions/checkout@v2
63+
- name: Use Node.js ${{ matrix.node-version }}
64+
uses: actions/setup-node@v1
65+
with:
66+
node-version: ${{ matrix.node-version }}
67+
- run: npm ci
68+
- run: npm run build --if-present
69+
- run: npm test
7070
```
7171
{% endraw %}
7272

@@ -119,14 +119,14 @@ jobs:
119119
runs-on: ubuntu-latest
120120
121121
steps:
122-
- uses: actions/checkout@v2
123-
- name: Use Node.js
124-
uses: actions/setup-node@v1
125-
with:
126-
node-version: '12.x'
127-
- run: npm ci
128-
- run: npm run build --if-present
129-
- run: npm test
122+
- uses: actions/checkout@v2
123+
- name: Use Node.js
124+
uses: actions/setup-node@v1
125+
with:
126+
node-version: '12.x'
127+
- run: npm ci
128+
- run: npm run build --if-present
129+
- run: npm test
130130
```
131131
{% endraw %}
132132

content/actions/guides/building-and-testing-powershell.md

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,15 @@ jobs:
5454
name: Pester test
5555
runs-on: ubuntu-latest
5656
steps:
57-
- name: Check out repository code
58-
uses: actions/checkout@v2
59-
- name: Perform a Pester test from the command-line
60-
shell: pwsh
61-
run: Test-Path resultsfile.log | Should -Be $true
62-
- name: Perform a Pester test from the Tests.ps1 file
63-
shell: pwsh
64-
run: |
65-
Invoke-Pester Unit.Tests.ps1 -Passthru
57+
- name: Check out repository code
58+
uses: actions/checkout@v2
59+
- name: Perform a Pester test from the command-line
60+
shell: pwsh
61+
run: Test-Path resultsfile.log | Should -Be $true
62+
- name: Perform a Pester test from the Tests.ps1 file
63+
shell: pwsh
64+
run: |
65+
Invoke-Pester Unit.Tests.ps1 -Passthru
6666
```
6767
{% endraw %}
6868
@@ -116,12 +116,12 @@ jobs:
116116
name: Install dependencies
117117
runs-on: ubuntu-latest
118118
steps:
119-
- uses: actions/checkout@v2
120-
- name: Install from PSGallery
121-
shell: pwsh
122-
run: |
123-
Set-PSRepository PSGallery -InstallationPolicy Trusted
124-
Install-Module SqlServer, PSScriptAnalyzer
119+
- uses: actions/checkout@v2
120+
- name: Install from PSGallery
121+
shell: pwsh
122+
run: |
123+
Set-PSRepository PSGallery -InstallationPolicy Trusted
124+
Install-Module SqlServer, PSScriptAnalyzer
125125
```
126126
{% endraw %}
127127

@@ -170,23 +170,23 @@ The following example installs `PSScriptAnalyzer` and uses it to lint all `ps1`
170170
name: Install and run PSScriptAnalyzer
171171
runs-on: ubuntu-latest
172172
steps:
173-
- uses: actions/checkout@v2
174-
- name: Install PSScriptAnalyzer module
175-
shell: pwsh
176-
run: |
177-
Set-PSRepository PSGallery -InstallationPolicy Trusted
178-
Install-Module PSScriptAnalyzer -ErrorAction Stop
179-
- name: Lint with PSScriptAnalyzer
180-
shell: pwsh
181-
run: |
182-
Invoke-ScriptAnalyzer -Path *.ps1 -Recurse -Outvariable issues
183-
$errors = $issues.Where({$_.Severity -eq 'Error'})
184-
$warnings = $issues.Where({$_.Severity -eq 'Warning'})
185-
if ($errors) {
186-
Write-Error "There were $($errors.Count) errors and $($warnings.Count) warnings total." -ErrorAction Stop
187-
} else {
188-
Write-Output "There were $($errors.Count) errors and $($warnings.Count) warnings total."
189-
}
173+
- uses: actions/checkout@v2
174+
- name: Install PSScriptAnalyzer module
175+
shell: pwsh
176+
run: |
177+
Set-PSRepository PSGallery -InstallationPolicy Trusted
178+
Install-Module PSScriptAnalyzer -ErrorAction Stop
179+
- name: Lint with PSScriptAnalyzer
180+
shell: pwsh
181+
run: |
182+
Invoke-ScriptAnalyzer -Path *.ps1 -Recurse -Outvariable issues
183+
$errors = $issues.Where({$_.Severity -eq 'Error'})
184+
$warnings = $issues.Where({$_.Severity -eq 'Warning'})
185+
if ($errors) {
186+
Write-Error "There were $($errors.Count) errors and $($warnings.Count) warnings total." -ErrorAction Stop
187+
} else {
188+
Write-Output "There were $($errors.Count) errors and $($warnings.Count) warnings total."
189+
}
190190
```
191191
{% endraw %}
192192

@@ -207,15 +207,15 @@ jobs:
207207
name: Run Pester and upload results
208208
runs-on: ubuntu-latest
209209
steps:
210-
- uses: actions/checkout@v2
211-
- name: Test with Pester
212-
shell: pwsh
213-
run: Invoke-Pester Unit.Tests.ps1 -Passthru | Export-CliXml -Path Unit.Tests.xml
214-
- name: Upload test results
215-
uses: actions/upload-artifact@v2
216-
with:
217-
name: ubuntu-Unit-Tests
218-
path: Unit.Tests.xml
210+
- uses: actions/checkout@v2
211+
- name: Test with Pester
212+
shell: pwsh
213+
run: Invoke-Pester Unit.Tests.ps1 -Passthru | Export-CliXml -Path Unit.Tests.xml
214+
- name: Upload test results
215+
uses: actions/upload-artifact@v2
216+
with:
217+
name: ubuntu-Unit-Tests
218+
path: Unit.Tests.xml
219219
if: ${{ always() }}
220220
```
221221
{% endraw %}
@@ -240,13 +240,13 @@ jobs:
240240
publish-to-gallery:
241241
runs-on: ubuntu-latest
242242
steps:
243-
- uses: actions/checkout@v2
244-
- name: Build and publish
245-
env:
246-
NUGET_KEY: ${{ secrets.NUGET_KEY }}
247-
shell: pwsh
248-
run: |
249-
./build.ps1 -Path /tmp/samplemodule
250-
Publish-Module -Path /tmp/samplemodule -NuGetApiKey $env:NUGET_KEY -Verbose
243+
- uses: actions/checkout@v2
244+
- name: Build and publish
245+
env:
246+
NUGET_KEY: ${{ secrets.NUGET_KEY }}
247+
shell: pwsh
248+
run: |
249+
./build.ps1 -Path /tmp/samplemodule
250+
Publish-Module -Path /tmp/samplemodule -NuGetApiKey $env:NUGET_KEY -Verbose
251251
```
252252
{% endraw %}

0 commit comments

Comments
 (0)