Skip to content

Commit b505e70

Browse files
committed
elaborate run-name
1 parent 7401ce9 commit b505e70

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

.github/workflows/powershell.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@
88
# https://github.com/PowerShell/PSScriptAnalyzer
99

1010
name: Powershell CI
11-
run-name: Validate commit ${{ github.sha }}
11+
run-name: >-
12+
Validate ${{
13+
github.event_name == 'push' && format(': {0}', github.head_commit.message)
14+
|| github.event_name == 'pull_request' && format('PR #{0}: {1}', github.event.pull_request.number, github.event.pull_request.title)
15+
|| github.event_name == 'schedule' && 'Scheduled'
16+
|| github.event_name == 'workflow_dispatch' && 'Manual Dispatch'
17+
|| 'CI Run'
18+
}}
1219
1320
on:
1421
push:

.github/workflows/publish-to-psgallery.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
name: Publish to PSGallery
2-
run-name: Publish commit ${{ github.sha }}
2+
run-name: >-
3+
Publish
4+
${{ github.event_name == 'push' && format(': {0}', github.head_commit.message)
5+
|| github.event_name == 'pull_request' && format('PR #{0}: {1}', github.event.pull_request.number, github.event.pull_request.title)
6+
|| github.event_name == 'schedule' && 'Scheduled'
7+
|| github.event_name == 'workflow_dispatch' && 'Manual Dispatch'
8+
|| 'CI Run'
9+
}}
310
411
on:
512
workflow_run:
613
workflows: ["PowerShell CI"]
714
types:
815
- completed
9-
1016
# Allows you to run this workflow manually from the Actions tab
1117
workflow_dispatch:
1218

0 commit comments

Comments
 (0)