Skip to content

Commit

Permalink
Merge branch 'main' into 361-introduction-visionnode
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianTrommer authored Nov 5, 2024
2 parents 168774e + 25b2bfe commit 361e6df
Showing 1 changed file with 28 additions and 3 deletions.
31 changes: 28 additions & 3 deletions .github/workflows/drive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,41 @@ jobs:
echo "AGENT_VERSION=${AGENT_VERSION}"
echo "COMPOSE_FILE=${COMPOSE_FILE}"
- name: Download artifact
uses: actions/download-artifact@v4
uses: actions/github-script@v6
with:
name: artifact
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == "artifact"
})[0];
if (!matchArtifact) {
core.setFailed('No artifact found from the build workflow');
return;
}
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/artifact.zip`, Buffer.from(download.data));
- name: Unzip artifact
run: unzip artifact.zip
- name: Return artifact JSON
- name: Debug path
run: |
ls -a
id: return-artifact-json
uses: actions/github-script@v6
with:
script: |
let fs = require('fs');
let data = JSON.parse(fs.readFileSync('${process.env.GITHUB_WORKSPACE}/artifacts.json'));
let data = JSON.parse(fs.readFileSync('${process.env.GITHUB_WORKSPACE}/artifacts/artifacts.json'));
return data;
- name: Run docker-compose
Expand Down

0 comments on commit 361e6df

Please sign in to comment.