mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 01:29:07 +00:00
download artifact from other workflow
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
parent
c972168d02
commit
830ac050c6
22
.github/workflows/publish.yaml
vendored
22
.github/workflows/publish.yaml
vendored
@ -16,10 +16,26 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: ./src/github.com/linuxkit/linuxkit
|
path: ./src/github.com/linuxkit/linuxkit
|
||||||
- name: Download linuxkit
|
- name: Download linuxkit
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/github-script@v3.1.0
|
||||||
with:
|
with:
|
||||||
name: linuxkit-amd64-linux
|
script: |
|
||||||
path: bin
|
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 == "linuxkit-amd64-linux"
|
||||||
|
})[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}}/bin/linuxkit-amd64-linux.zip', Buffer.from(download.data));
|
||||||
|
- run: cd bin && unzip linuxkit-amd64-linux.zip
|
||||||
- name: Symlink Linuxkit
|
- name: Symlink Linuxkit
|
||||||
run: |
|
run: |
|
||||||
chmod ugo+x bin/linuxkit-amd64-linux
|
chmod ugo+x bin/linuxkit-amd64-linux
|
||||||
|
Loading…
Reference in New Issue
Block a user