git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/4] ci: use a newer `github-script` version

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Dec 7, 2022, 14:34 UTC
Message-ID
<472481561f03900fb519065d88ae8af910bea794.1670423680.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.1440.git.1670423680.gitgitgadget@gmail.com>
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.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
---
 .github/workflows/main.yml | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 5262823eb1c..43d47824dd3 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,
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Taylor Blau
Message 2 of 11 in “Avoid using deprecated features in Git's GitHub workflows”
  1. 0/4 Avoid using deprecated features in Git's GitHub workflowsJohannes Schindelin via GitGitGadget, Dec 7, 2022
  2. 1/4 ci: use a newer `github-script` versionJohannes Schindelin via GitGitGadget, Dec 7, 2022
  3. Taylor BlauDec 7, 2022
  4. 2/4 ci: avoid deprecated `set-output` workflow commandJohannes Schindelin via GitGitGadget, Dec 7, 2022
  5. Taylor BlauDec 7, 2022
  6. 3/4 ci: avoid using deprecated {up,down}load-artifacts ActionJohannes Schindelin via GitGitGadget, Dec 7, 2022
  7. 4/4 ci(l10n): avoid using the deprecated `set-output` workflow commandJohannes Schindelin via GitGitGadget, Dec 7, 2022
  8. Taylor BlauDec 7, 2022
  9. Junio C HamanoDec 7, 2022
  10. Junio C HamanoDec 8, 2022
  11. Ævar Arnfjörð BjarmasonDec 7, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.