225 create and example to show how to use lemontreeautomation docker container for pipeline tasks #150
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) LieberLieber Software GmbH | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
name: Download XMI files for Commit ID | |
on: | |
pull_request_target: | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
- review_requested | |
env: | |
xmiURL: https://nexus.lieberlieber.com/service/rest/v1/search?repository=xmi | |
jobs: | |
DownloadPostCommitXmi: | |
defaults: | |
run: | |
shell: pwsh | |
runs-on: windows-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
lfs: true | |
fetch-depth: 0 | |
- name: Download XMI Files | |
id: downloadXmi | |
run: | | |
$gitcommitId = git rev-parse origin/$env:GITHUB_HEAD_REF | |
Write-Output "git CommitId: $gitcommitId" | |
$url = "${{env.xmiURL}}&name=$gitcommitId*" | |
Write-Output $url | |
$json = Invoke-RestMethod -Uri $url -Method Get | |
foreach ($url in $json.items.assets.downloadUrl) | |
{ | |
$url = $url.Insert(4,"s") | |
$file = $url.Substring($url.lastIndexOf('/') + 1) | |
if($file.StartsWith($gitcommitId)) | |
{ | |
Write-Output "Download: $file" | |
$content = ((Invoke-WebRequest -Uri $url -Method Get) -replace "") | |
[IO.File]::WriteAllLines($file, $content) | |
} | |
} | |
exit 0 | |
- name: Archive Session Files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Post Commit XMi | |
path: ".\\*.xmi" #${{ steps.downloadXmi.outputs.result }} | |
retention-days: 5 | |