This repository has been archived by the owner on Nov 20, 2023. It is now read-only.
forked from blue-build/legacy-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: restore download artifact step, support multi-line tags (blue-bu…
- Loading branch information
1 parent
8a6f343
commit c40bddf
Showing
1 changed file
with
26 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,9 +17,27 @@ jobs: | |
github.event.workflow_run.event == 'pull_request' && | ||
github.event.workflow_run.conclusion == 'success' | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
- name: 'Download artifact' | ||
uses: actions/[email protected] | ||
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 | ||
id: load_image | ||
|
@@ -29,7 +47,12 @@ jobs: | |
cat tags | ||
podman load -i image.tar | ||
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 | ||
id: registry_case | ||
|