File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
hugoalh.GitHubActionsToolkit Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ Import-Module -Name 'hugoalh.GitHubActionsToolkit' -Prefix 'GitHubActions' -Scop
60
60
- ` Get-GitHubActionsState `
61
61
- ` Get-GitHubActionsStepSummary `
62
62
- ` Get-GitHubActionsWebhookEventPayload `
63
+ - ` Get-GitHubActionsWorkflowRunUri `
63
64
- ` Remove-GitHubActionsProblemMatcher `
64
65
- ` Remove-GitHubActionsStepSummary `
65
66
- ` Set-GitHubActionsEnvironmentVariable `
Original file line number Diff line number Diff line change 77
77
' Get-State' ,
78
78
' Get-StepSummary' ,
79
79
' Get-WebhookEventPayload' ,
80
+ ' Get-WorkflowRunUri' ,
80
81
' Remove-ProblemMatcher' ,
81
82
' Remove-StepSummary' ,
82
83
' Set-EnvironmentVariable' ,
138
139
' Get-Payload' ,
139
140
' Get-WebhookEvent' ,
140
141
' Get-WebhookPayload' ,
142
+ ' Get-WorkflowRunUrl' ,
141
143
' Restore-State' ,
142
144
' Save-State' ,
143
145
' Set-Env' ,
Original file line number Diff line number Diff line change @@ -89,6 +89,21 @@ Set-Alias -Name 'Get-WebhookEvent' -Value 'Get-WebhookEventPayload' -Option 'Rea
89
89
Set-Alias - Name ' Get-WebhookPayload' - Value ' Get-WebhookEventPayload' - Option ' ReadOnly' - Scope ' Local'
90
90
<#
91
91
. SYNOPSIS
92
+ GitHub Actions - Get Workflow Run URI
93
+ . DESCRIPTION
94
+ Get the workflow run's URI.
95
+ . OUTPUTS
96
+ String
97
+ #>
98
+ function Get-WorkflowRunUri {
99
+ [CmdletBinding (HelpUri = ' https://github.com/hugoalh-studio/ghactions-toolkit-powershell/wiki/api_function_get-githubactionsworkflowrunuri#Get-GitHubActionsWorkflowRunUri' )]
100
+ [OutputType ([String ])]
101
+ param ()
102
+ return " $env: GITHUB_SERVER_URL /$env: GITHUB_REPOSITORY /actions/runs/$env: GITHUB_RUN_ID "
103
+ }
104
+ Set-Alias - Name ' Get-WorkflowRunUrl' - Value ' Get-WorkflowRunUri' - Option ' ReadOnly' - Scope ' Local'
105
+ <#
106
+ . SYNOPSIS
92
107
GitHub Actions - Test Environment
93
108
. DESCRIPTION
94
109
Test the current process whether is executing inside the GitHub Actions environment.
@@ -148,12 +163,14 @@ Export-ModuleMember -Function @(
148
163
' Add-SecretMask' ,
149
164
' Get-IsDebug' ,
150
165
' Get-WebhookEventPayload' ,
166
+ ' Get-WorkflowRunUri' ,
151
167
' Test-Environment'
152
168
) - Alias @ (
153
169
' Add-Mask' ,
154
170
' Add-Secret' ,
155
171
' Get-Event' ,
156
172
' Get-Payload' ,
157
173
' Get-WebhookEvent' ,
158
- ' Get-WebhookPayload'
174
+ ' Get-WebhookPayload' ,
175
+ ' Get-WorkflowRunUrl'
159
176
)
You can’t perform that action at this time.
0 commit comments