Skip to content

Commit 7a522e9

Browse files
(chore) Upgrade size report comment workflow to github-script v6 (#3849)
* Upgrade scripts to v6 * Use REST namespace for actions
1 parent 30cb6c7 commit 7a522e9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎.github/workflows/size_report_comment.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ jobs:
1414
github.event.workflow_run.conclusion == 'success'
1515
steps:
1616
- name: "Download size report artifact"
17-
uses: actions/github-script@v3.1.0
17+
uses: actions/github-script@v6
1818
with:
1919
script: |
20-
var artifacts = await github.actions.listWorkflowRunArtifacts({
20+
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
2121
owner: context.repo.owner,
2222
repo: context.repo.repo,
2323
run_id: ${{github.event.workflow_run.id }},
2424
});
2525
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
2626
return artifact.name == "size_report"
2727
})[0];
28-
var download = await github.actions.downloadArtifact({
28+
var download = await github.rest.actions.downloadArtifact({
2929
owner: context.repo.owner,
3030
repo: context.repo.repo,
3131
artifact_id: matchArtifact.id,
@@ -37,14 +37,14 @@ jobs:
3737
- run: unzip -d size_report size_report.zip
3838

3939
- name: "Comment on PR"
40-
uses: actions/github-script@v3
40+
uses: actions/github-script@v6
4141
with:
4242
github-token: ${{ secrets.GITHUB_TOKEN }}
4343
script: |
4444
var fs = require('fs');
4545
var issue_number = Number(fs.readFileSync('./size_report/pull_req_nr'));
4646
var size_report = String(fs.readFileSync('./size_report/report.md'));
47-
await github.issues.createComment({
47+
await github.rest.issues.createComment({
4848
owner: context.repo.owner,
4949
repo: context.repo.repo,
5050
issue_number: issue_number,

0 commit comments

Comments
 (0)