Skip to content

Commit fff4011

Browse files
committed
ci: Auto update Github Action workflows
1 parent dc668a0 commit fff4011

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/module-ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
run-e2e: ${{ steps.run-e2e.outputs.result }}
5757
run-ui-tests: ${{ steps.run-ui-tests.outputs.result }}
5858
deployment-folder-exists: ${{ steps.check_deployment_folder.outputs.exists }}
59+
requiredModuleListUrl: ${{ steps.extract_pr_url.outputs.url }}
5960

6061
steps:
6162

@@ -207,6 +208,36 @@ jobs:
207208
echo "result=true" >> $GITHUB_OUTPUT
208209
fi
209210
211+
- name: Extract URL from PR message
212+
if: ${{ github.event_name == 'pull_request' }}
213+
id: extract_pr_url
214+
shell: pwsh
215+
env:
216+
PR_BODY: ${{ github.event.pull_request.body }}
217+
run: |
218+
$text = $env:PR_BODY
219+
$marker = 'Required modules list URL'
220+
221+
$url = ''
222+
if ($null -ne $text -and $text.Contains($marker)) {
223+
$startIndex = $text.IndexOf($marker)
224+
if ($startIndex -ge 0) {
225+
$slice = $text.Substring($startIndex)
226+
$match = [regex]::Match($slice, 'https?://[^ )\r\n]+')
227+
if ($match.Success) {
228+
$url = $match.Value
229+
}
230+
}
231+
}
232+
233+
if ([string]::IsNullOrWhiteSpace($url) -eq $false) {
234+
Write-Host "url found: $url"
235+
Add-Content -Path $env:GITHUB_OUTPUT -Value "url=$url"
236+
} else {
237+
Write-Host "url NOT found"
238+
Add-Content -Path $env:GITHUB_OUTPUT -Value "url="
239+
}
240+
210241
- name: Look for xapi module in dependencies
211242
id: run-ui-tests
212243
shell: pwsh
@@ -304,6 +335,7 @@ jobs:
304335
installCustomModule: 'true'
305336
customModuleId: ${{ needs.ci.outputs.moduleId }}
306337
customModuleUrl: ${{ needs.ci.outputs.artifactUrl }}
338+
customModuleListUrl: ${{ needs.ci.outputs.requiredModuleListUrl }}
307339
platformDockerTag: 'dev-linux-latest'
308340
storefrontDockerTag: 'dev-linux-latest'
309341
secrets:

0 commit comments

Comments
 (0)