All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ci: use a newer `github-script` version
@ 2022-11-08 10:13 Johannes Schindelin via GitGitGadget
  2022-11-08 20:37 ` Taylor Blau
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Schindelin via GitGitGadget @ 2022-11-08 10:13 UTC (permalink / raw)
  To: git; +Cc: Johannes Schindelin, Johannes Schindelin

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>
---
    ci: use a newer github-script version
    
    I had a look at the CI run of seen a couple of weeks ago and saw not
    only quite a number of failures but also quite a number of warnings.
    
    This patch addresses a few of them, including the ones about using the
    deprecated ::set-output:: workflow command
    [https://github.com/gitgitgadget/git/actions/runs/3412982102/jobs/5679166059#step:4:46].
    
    Similar warnings will be addressed by
    od/ci-use-checkout-v3-when-applicable.

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1387%2Fdscho%2Fupgrade-github-script-version-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1387/dscho/upgrade-github-script-version-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1387

 .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 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,

base-commit: 4732897cf0a255a23dca9e97b65cea40cd06c5a8
-- 
gitgitgadget

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ci: use a newer `github-script` version
  2022-11-08 10:13 [PATCH] ci: use a newer `github-script` version Johannes Schindelin via GitGitGadget
@ 2022-11-08 20:37 ` Taylor Blau
  0 siblings, 0 replies; 2+ messages in thread
From: Taylor Blau @ 2022-11-08 20:37 UTC (permalink / raw)
  To: Johannes Schindelin via GitGitGadget; +Cc: git, Johannes Schindelin

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-08 20:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-08 10:13 [PATCH] ci: use a newer `github-script` version Johannes Schindelin via GitGitGadget
2022-11-08 20:37 ` Taylor Blau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.