ci: use a newer `github-script` version

The old version we currently use runs in node.js v12.x, which is being deprecated in GitHub Actions. The new version uses node.js v16.x. Incidentally, this also avoids the warning about the deprecated `::set-output::` workflow command because the newer version of the `github-script` Action uses the recommended new way to specify outputs. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Taylor Blau <me@ttaylorr.com>

Johannes Schindelin committed Nov 8, 2022 at 10:13 UTC 63357b79c9384158ff169b910eab501dff4abf8b
1 file changed +3 -3
.github/workflows/main.yml
+3 -3
@@ -37,14 +37,14 @@ jobs:
37 echo "::set-output name=enabled::$enabled"
38 - name: skip if the commit or tree was already tested
39 id: skip-if-redundant
40 - uses: actions/github-script@v3
40 + uses: actions/github-script@v6
41 if: steps.check-ref.outputs.enabled == 'yes'
42 with:
43 github-token: ${{secrets.GITHUB_TOKEN}}
44 script: |
45 try {
46 // Figure out workflow ID, commit and tree
47 - const { data: run } = await github.actions.getWorkflowRun({
47 + const { data: run } = await github.rest.actions.getWorkflowRun({
48 owner: context.repo.owner,
49 repo: context.repo.repo,
50 run_id: context.runId,
@@ -54,7 +54,7 @@ jobs:
54 const tree_id = run.head_commit.tree_id;
55
56 // See whether there is a successful run for that commit or tree
57 - const { data: runs } = await github.actions.listWorkflowRuns({
57 + const { data: runs } = await github.rest.actions.listWorkflowRuns({
58 owner: context.repo.owner,
59 repo: context.repo.repo,
60 per_page: 500,