Merge branch 'js/ci-set-output'

Update the actions/github-script dependency in CI to avoid a
deprecation warning.

* js/ci-set-output:
  ci: use a newer `github-script` version
This commit is contained in:
Taylor Blau 2022-11-14 19:53:38 -05:00
commit 69eb1be693

View File

@ -37,14 +37,14 @@ jobs:
echo "::set-output name=enabled::$enabled" echo "::set-output name=enabled::$enabled"
- name: skip if the commit or tree was already tested - name: skip if the commit or tree was already tested
id: skip-if-redundant id: skip-if-redundant
uses: actions/github-script@v3 uses: actions/github-script@v6
if: steps.check-ref.outputs.enabled == 'yes' if: steps.check-ref.outputs.enabled == 'yes'
with: with:
github-token: ${{secrets.GITHUB_TOKEN}} github-token: ${{secrets.GITHUB_TOKEN}}
script: | script: |
try { try {
// Figure out workflow ID, commit and tree // 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, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
run_id: context.runId, run_id: context.runId,
@ -54,7 +54,7 @@ jobs:
const tree_id = run.head_commit.tree_id; const tree_id = run.head_commit.tree_id;
// See whether there is a successful run for that commit or tree // 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, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
per_page: 500, per_page: 500,