Skip to content

Commit 1b933c2

Browse files
committed
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 <[email protected]>
1 parent 4732897 commit 1b933c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ jobs:
3737
echo "::set-output name=enabled::$enabled"
3838
- name: skip if the commit or tree was already tested
3939
id: skip-if-redundant
40-
uses: actions/github-script@v3
40+
uses: actions/github-script@v6
4141
if: steps.check-ref.outputs.enabled == 'yes'
4242
with:
4343
github-token: ${{secrets.GITHUB_TOKEN}}
4444
script: |
4545
try {
4646
// Figure out workflow ID, commit and tree
47-
const { data: run } = await github.actions.getWorkflowRun({
47+
const { data: run } = await github.rest.actions.getWorkflowRun({
4848
owner: context.repo.owner,
4949
repo: context.repo.repo,
5050
run_id: context.runId,
@@ -54,7 +54,7 @@ jobs:
5454
const tree_id = run.head_commit.tree_id;
5555
5656
// 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({
5858
owner: context.repo.owner,
5959
repo: context.repo.repo,
6060
per_page: 500,

0 commit comments

Comments
 (0)