mirror of
https://github.com/optim-enterprises-bv/secureblue.git
synced 2025-11-06 21:37:51 +00:00
fix: restore download artifact step, support multi-line tags (#90)
This commit is contained in:
29
.github/workflows/pr-publish.yml
vendored
29
.github/workflows/pr-publish.yml
vendored
@@ -17,9 +17,27 @@ jobs:
|
|||||||
github.event.workflow_run.event == 'pull_request' &&
|
github.event.workflow_run.event == 'pull_request' &&
|
||||||
github.event.workflow_run.conclusion == 'success'
|
github.event.workflow_run.conclusion == 'success'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- name: 'Download artifact'
|
||||||
|
uses: actions/github-script@v3.1.0
|
||||||
with:
|
with:
|
||||||
name: output
|
script: |
|
||||||
|
var artifacts = await github.actions.listWorkflowRunArtifacts({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
run_id: ${{github.event.workflow_run.id }},
|
||||||
|
});
|
||||||
|
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
||||||
|
return artifact.name == "output"
|
||||||
|
})[0];
|
||||||
|
var download = await github.actions.downloadArtifact({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
artifact_id: matchArtifact.id,
|
||||||
|
archive_format: 'zip',
|
||||||
|
});
|
||||||
|
var fs = require('fs');
|
||||||
|
fs.writeFileSync('${{github.workspace}}/output.zip', Buffer.from(download.data));
|
||||||
|
- run: unzip output.zip
|
||||||
|
|
||||||
- name: Load Container Image
|
- name: Load Container Image
|
||||||
id: load_image
|
id: load_image
|
||||||
@@ -29,7 +47,12 @@ jobs:
|
|||||||
cat tags
|
cat tags
|
||||||
podman load -i image.tar
|
podman load -i image.tar
|
||||||
echo image="$(cat image)" >> $GITHUB_OUTPUT
|
echo image="$(cat image)" >> $GITHUB_OUTPUT
|
||||||
echo tags="$(cat tags)" >> $GITHUB_OUTPUT
|
delimiter="$(openssl rand -hex 8)"
|
||||||
|
{
|
||||||
|
echo "tags<<${delimiter}"
|
||||||
|
cat tags
|
||||||
|
echo "${delimiter}"
|
||||||
|
} >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Lowercase Registry
|
- name: Lowercase Registry
|
||||||
id: registry_case
|
id: registry_case
|
||||||
|
|||||||
Reference in New Issue
Block a user