Skip to content

Commit

Permalink
Update upload-single-model.yml
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
agg3fe authored Feb 5, 2024
1 parent 8177aea commit 71994a0
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions .github/workflows/upload-single-model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,30 +34,13 @@ jobs:
sparse-checkout: |
.github
io.catenax.generic.digital_product_passport/3.0.0
- name: Download artifact
uses: actions/github-[email protected]
- name: Read digital_product_passport
id: package
uses: jaywcjlove/github-action-read-file@main
with:
script: |
var artifacts = await github.rest.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.rest.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
cat output.json
path: output.json
- name: Echo output.json
run: echo "${{ steps.package.outputs.content }}"
- name: Fetch Access Token
id: token_request
env:
Expand All @@ -83,4 +66,4 @@ jobs:
uses: ./.github/actions/upload
with:
SEMANTIC_HUB_URL: ${{ secrets[format('SEMANTIC_HUB_{0}_BASE', env.WORKSPACE_UPPERCASE)] }}
TOKEN: ${{ env.ACCESS_TOKEN }}
TOKEN: ${{ env.ACCESS_TOKEN }}

0 comments on commit 71994a0

Please sign in to comment.