Message ID | pull.1387.git.1667902408921.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 63357b79c9384158ff169b910eab501dff4abf8b |
Headers | show |
Series | ci: use a newer `github-script` version | expand |
On Tue, Nov 08, 2022 at 10:13:28AM +0000, Johannes Schindelin via GitGitGadget wrote: > From: Johannes Schindelin <johannes.schindelin@gmx.de> > > 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. Thanks for working on this. I also appreciate you taking a more minimal approach by avoiding touching the explicit "echo ::set-output::"'s throughout the workflow definition, since there is other work going on there. So let's merge this one down, let the dust settle on the other topic, and then come back and remove the remaining ::set-output::'s later on. Thanks, Taylor
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 831f4df56c5..cdfb777a699 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,14 +37,14 @@ jobs: echo "::set-output name=enabled::$enabled" - name: skip if the commit or tree was already tested id: skip-if-redundant - uses: actions/github-script@v3 + uses: actions/github-script@v6 if: steps.check-ref.outputs.enabled == 'yes' with: github-token: ${{secrets.GITHUB_TOKEN}} script: | try { // Figure out workflow ID, commit and tree - const { data: run } = await github.actions.getWorkflowRun({ + const { data: run } = await github.rest.actions.getWorkflowRun({ owner: context.repo.owner, repo: context.repo.repo, run_id: context.runId, @@ -54,7 +54,7 @@ jobs: const tree_id = run.head_commit.tree_id; // See whether there is a successful run for that commit or tree - const { data: runs } = await github.actions.listWorkflowRuns({ + const { data: runs } = await github.rest.actions.listWorkflowRuns({ owner: context.repo.owner, repo: context.repo.repo, per_page: 500,