Skip to content

Commit 1588868

Browse files
committed
update workflows 20
1 parent 07d143b commit 1588868

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/test-action.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,27 @@ defaults:
1414
shell: pwsh
1515

1616
jobs:
17+
trigger-info:
18+
name: Trigger info
19+
permissions:
20+
contents: read
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Dump github context for debug purposes
24+
env:
25+
GITHUB_CONTEXT: ${{ toJSON(github) }}
26+
run: $env:GITHUB_CONTEXT
27+
- name: Trigger info
28+
run: |
29+
Write-Output "::notice::This worklfow was triggered by a 'workflow_run' from '${{ github.event.workflow_run.name }}'."
30+
1731
only-errors-true:
1832
name: only-errors set to true
1933
permissions:
2034
contents: read
2135
runs-on: ubuntu-latest
2236
steps:
23-
- name: Dump github co ntext for debug purposes
37+
- name: Dump github context for debug purposes
2438
env:
2539
GITHUB_CONTEXT: ${{ toJSON(github) }}
2640
run: $env:GITHUB_CONTEXT
@@ -121,7 +135,7 @@ jobs:
121135
contents: read
122136
runs-on: ubuntu-latest
123137
steps:
124-
- name: Dump github co ntext for debug purposes
138+
- name: Dump github context for debug purposes
125139
env:
126140
GITHUB_CONTEXT: ${{ toJSON(github) }}
127141
run: $env:GITHUB_CONTEXT
@@ -222,7 +236,7 @@ jobs:
222236
contents: read
223237
runs-on: ubuntu-latest
224238
steps:
225-
- name: Dump github co ntext for debug purposes
239+
- name: Dump github context for debug purposes
226240
env:
227241
GITHUB_CONTEXT: ${{ toJSON(github) }}
228242
run: $env:GITHUB_CONTEXT
@@ -284,7 +298,7 @@ jobs:
284298
contents: read
285299
runs-on: ubuntu-latest
286300
steps:
287-
- name: Dump github co ntext for debug purposes
301+
- name: Dump github context for debug purposes
288302
env:
289303
GITHUB_CONTEXT: ${{ toJSON(github) }}
290304
run: $env:GITHUB_CONTEXT
@@ -313,7 +327,7 @@ jobs:
313327
contents: read
314328
runs-on: ubuntu-latest
315329
steps:
316-
- name: Dump github co ntext for debug purposes
330+
- name: Dump github context for debug purposes
317331
env:
318332
GITHUB_CONTEXT: ${{ toJSON(github) }}
319333
run: $env:GITHUB_CONTEXT
@@ -353,7 +367,7 @@ jobs:
353367
statuses: write
354368
runs-on: ubuntu-latest
355369
steps:
356-
- name: Dump github co ntext for debug purposes
370+
- name: Dump github context for debug purposes
357371
env:
358372
GITHUB_CONTEXT: ${{ toJSON(github) }}
359373
run: $env:GITHUB_CONTEXT
@@ -381,14 +395,13 @@ jobs:
381395
$state = 'error'
382396
}
383397
384-
385398
$uri = "https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.event.workflow_run.head_sha }}"
386399
$headers = @{
387400
Accept = "application/vnd.github.v3+json"
388401
Authorization = "Bearer ${{ secrets.GITHUB_TOKEN }}"
389402
}
390403
$body = @{
391-
context = '${{ github.workflow }} / ${{ github.event.workflow_run }} (${{ github.event_name }})' # mimic format from github
404+
context = '${{ github.workflow }} / ${{ github.event.workflow_run.name }} (${{ github.event_name }})' # mimic format from github
392405
description = $description
393406
target_url = 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}'
394407
state = $state

0 commit comments

Comments
 (0)