Skip to content

Commit bc2ec56

Browse files
Merge pull request #136 from dandawg/odh-ghaction-update
actions/upload-artifact upgrade to v4
2 parents b8d339a + 0d7560b commit bc2ec56

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

.github/workflows/build-prs-trigger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
echo ${{ github.event.pull_request.state }} >> ./pr/pr_state
2828
echo ${{ github.event.pull_request.head.sha }} >> ./pr/head_sha
2929
echo ${{ github.event.action }} >> ./pr/event_action
30-
- uses: actions/upload-artifact@v3
30+
- uses: actions/upload-artifact@v4
3131
with:
3232
name: pr
3333
path: pr/

.github/workflows/build-prs.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,24 @@ jobs:
2424
event_action: ${{ steps.vars.outputs.event_action }}
2525
steps:
2626
- name: 'Download artifact'
27-
uses: actions/github-script@v3.1.0
27+
uses: actions/github-script@v6
2828
with:
2929
script: |
30-
var artifacts = await github.actions.listWorkflowRunArtifacts({
30+
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
3131
owner: context.repo.owner,
3232
repo: context.repo.repo,
3333
run_id: ${{github.event.workflow_run.id }},
3434
});
35-
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
35+
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
3636
return artifact.name == "pr"
3737
})[0];
38-
var download = await github.actions.downloadArtifact({
38+
let download = await github.rest.actions.downloadArtifact({
3939
owner: context.repo.owner,
4040
repo: context.repo.repo,
4141
artifact_id: matchArtifact.id,
4242
archive_format: 'zip',
4343
});
44-
var fs = require('fs');
44+
let fs = require('fs');
4545
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
4646
- run: unzip pr.zip
4747
- shell: bash

.github/workflows/commit-check-pr.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,21 @@ jobs:
2525
uses: actions/[email protected]
2626
with:
2727
script: |
28-
var artifacts = await github.actions.listWorkflowRunArtifacts({
28+
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
2929
owner: context.repo.owner,
3030
repo: context.repo.repo,
3131
run_id: ${{github.event.workflow_run.id }},
3232
});
33-
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
33+
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
3434
return artifact.name == "pr"
3535
})[0];
36-
var download = await github.actions.downloadArtifact({
36+
let download = await github.rest.actions.downloadArtifact({
3737
owner: context.repo.owner,
3838
repo: context.repo.repo,
3939
artifact_id: matchArtifact.id,
4040
archive_format: 'zip',
4141
});
42-
var fs = require('fs');
42+
let fs = require('fs');
4343
fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
4444
- run: unzip pr.zip
4545
- shell: bash

0 commit comments

Comments
 (0)