Skip to contentSkip to conversation

GitHub Actions update

PATCH In review Junio C Hamano 2 participants 5 messages Feb 2, 2024 – Feb 3, 2024 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

cover GitHub Actions update

The CI jobs are getting "Node.js 16 actions are deprecated." warnings for jobs that use checkout@v3, github-script@v6, and download-artifact@v3.

These two patches update these jobs to use checkout@v4 and github-script@v7, both of which are said to use Node.js 20.

download-artifact@v4 exists but it is labeled as "major changes" with breaking changes, so I refrained from touching its use to defer it to folks who are more experienced with its use.

Junio C Hamano (2):
GitHub Actions: update to checkout@v4
GitHub Actions: update to github-script@v7

 .github/workflows/check-whitespace.yml |  2 +-
 .github/workflows/coverity.yml         |  2 +-
 .github/workflows/main.yml             | 20 ++++++++++----------
 3 files changed, 12 insertions(+), 12 deletions(-)
Signature · 1 line
2.43.0-522-g2a540e432f
#1 lore raw

PATCH 1/2 GitHub Actions: update to checkout@v4

We seem to be getting "Node.js 16 actions are deprecated." warnings for jobs that use checkout@v3. Except for the i686 containers job that is kept at checkout@v1 [*], update to checkout@v4, which is said to use Node.js 20.

[*] 6cf4d908 (ci(main): upgrade actions/checkout to v3, 2022-12-05)
refers to https://github.com/actions/runner/issues/2115 and explains why container jobs are kept at checkout@v1. We may want to check the current status of the issue and move it to the same version as other jobs, but that is outside the scope of this step.

---
 .github/workflows/check-whitespace.yml |  2 +-
 .github/workflows/coverity.yml         |  2 +-
 .github/workflows/main.yml             | 18 +++++++++---------
 3 files changed, 11 insertions(+), 11 deletions(-)
.github/workflows/check-whitespace.yml +1 -1
index a58e2dc8ad..a241a63428 100644
@@ -19,7 +19,7 @@ jobs:
   check-whitespace:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
       with:
         fetch-depth: 0
 
.github/workflows/coverity.yml +1 -1
index e5532d381b..a81a7566d1 100644
@@ -38,7 +38,7 @@ jobs:
       COVERITY_LANGUAGE: cxx
       COVERITY_PLATFORM: overridden-below
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
       - name: install minimal Git for Windows SDK
         if: contains(matrix.os, 'windows')
         uses: git-for-windows/setup-git-for-windows-sdk@v1
.github/workflows/main.yml +9 -9
index 4d97da57ec..90973f9693 100644
@@ -112,7 +112,7 @@ jobs:
       group: windows-build-${{ github.ref }}
       cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - uses: git-for-windows/setup-git-for-windows-sdk@v1
     - name: build
       shell: bash
@@ -173,10 +173,10 @@ jobs:
       group: vs-build-${{ github.ref }}
       cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - uses: git-for-windows/setup-git-for-windows-sdk@v1
     - name: initialize vcpkg
-      uses: actions/checkout@v3
+      uses: actions/checkout@v4
       with:
         repository: 'microsoft/vcpkg'
         path: 'compat/vcbuild/vcpkg'
@@ -297,7 +297,7 @@ jobs:
       runs_on_pool: ${{matrix.vector.pool}}
     runs-on: ${{matrix.vector.pool}}
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: ci/install-dependencies.sh
     - run: ci/run-build-and-tests.sh
     - name: print test failures
@@ -317,7 +317,7 @@ jobs:
       CC: clang
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: ci/install-dependencies.sh
     - run: ci/run-build-and-minimal-fuzzers.sh
   dockerized:
@@ -342,7 +342,7 @@ jobs:
     runs-on: ubuntu-latest
     container: ${{matrix.vector.image}}
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
       if: matrix.vector.jobname != 'linux32'
     - uses: actions/checkout@v1
       if: matrix.vector.jobname == 'linux32'
@@ -373,7 +373,7 @@ jobs:
       group: static-analysis-${{ github.ref }}
       cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: ci/install-dependencies.sh
     - run: ci/run-static-analysis.sh
     - run: ci/check-directional-formatting.bash
@@ -396,7 +396,7 @@ jobs:
         artifact: sparse-20.04
     - name: Install the current `sparse` package
       run: sudo dpkg -i sparse-20.04/sparse_*.deb
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - name: Install other dependencies
       run: ci/install-dependencies.sh
     - run: make sparse
@@ -411,6 +411,6 @@ jobs:
       jobname: Documentation
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: ci/install-dependencies.sh
     - run: ci/test-documentation.sh
Signature · 1 line
2.43.0-522-g2a540e432f

A message that is not in the archive (sent off-list or not yet received): CADCFv=5=uwp_NVpndTYFiRRK4hEwmMdA2At80cXuS91V5mKN2A@mail.gmail.com

#3 lore raw

Re: [PATCH 1/2] GitHub Actions: update to checkout@v4

I am adding non-html e-mail reply to keep track in [email protected]:

The switch to checkout@v4 for GitHub Actions looks good to me. I wonder if we should be updating other actions to v4 so they start using Node 20:

In coverity.yml
(https://github.com/git/git/blob/8838dd21e8a4ec1324377ffcfa90413844ca3674/.github/workflows/coverity.yml#L101C15-L101C39)

actions/cache/restore@v3 -> v4 (reference:
https://github.com/actions/cache/releases/tag/v4.0.0)
actions/cache/save@v3 -> v4 (reference:
https://github.com/actions/cache/releases/tag/v4.0.0)

In main.yml

actions/upload-artifact@v3 -> v4 (reference:
https://github.com/actions/upload-artifact/commit/aa5cae10db2b39d79f5244f6bc5084278993a3ae#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6R33)
actions/download-artifact@v3 -> v4 (reference:
https://github.com/actions/download-artifact/commit/88dadfbcfcdd10293192ac8ee1e3ffe61f7055ee#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6R28)

Quoted 147 lines · Óscar Domínguez Celada

The switch to checkout@v4 for GitHub Actions looks good to me. I wonder if we should be updating other actions to v4 so they start using Node 20:

In coverity.yml

actions/cache/restore@v3 -> v4 (reference: https://github.com/actions/cache/releases/tag/v4.0.0)
actions/cache/save@v3 -> v4 (reference: https://github.com/actions/cache/releases/tag/v4.0.0)

In main.yml

actions/upload-artifact@v3 -> v4 (reference: https://github.com/actions/upload-artifact/commit/aa5cae10db2b39d79f5244f6bc5084278993a3ae#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6R33)
actions/download-artifact@v3 -> v4 (reference: https://github.com/actions/download-artifact/commit/88dadfbcfcdd10293192ac8ee1e3ffe61f7055ee#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6R28)

Quoted 126 lines · Junio C Hamano

We seem to be getting "Node.js 16 actions are deprecated." warnings for jobs that use checkout@v3. Except for the i686 containers job that is kept at checkout@v1 [*], update to checkout@v4, which is said to use Node.js 20.

[*] 6cf4d908 (ci(main): upgrade actions/checkout to v3, 2022-12-05)
refers to https://github.com/actions/runner/issues/2115 and explains why container jobs are kept at checkout@v1. We may want to check the current status of the issue and move it to the same version as other jobs, but that is outside the scope of this step.

---
 .github/workflows/check-whitespace.yml |  2 +-
 .github/workflows/coverity.yml         |  2 +-
 .github/workflows/main.yml             | 18 +++++++++---------
 3 files changed, 11 insertions(+), 11 deletions(-)
.github/workflows/check-whitespace.yml +1 -1
index a58e2dc8ad..a241a63428 100644
@@ -19,7 +19,7 @@ jobs:
   check-whitespace:
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
       with:
         fetch-depth: 0
 
.github/workflows/coverity.yml +1 -1
index e5532d381b..a81a7566d1 100644
@@ -38,7 +38,7 @@ jobs:
       COVERITY_LANGUAGE: cxx
       COVERITY_PLATFORM: overridden-below
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
       - name: install minimal Git for Windows SDK
         if: contains(matrix.os, 'windows')
         uses: git-for-windows/setup-git-for-windows-sdk@v1
.github/workflows/main.yml +9 -10
index 4d97da57ec..90973f9693 100644
@@ -112,7 +112,7 @@ jobs:
       group: windows-build-${{ github.ref }}
       cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - uses: git-for-windows/setup-git-for-windows-sdk@v1
     - name: build
       shell: bash
@@ -173,10 +173,10 @@ jobs:
       group: vs-build-${{ github.ref }}
       cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - uses: git-for-windows/setup-git-for-windows-sdk@v1
     - name: initialize vcpkg
-      uses: actions/checkout@v3
+      uses: actions/checkout@v4
       with:
         repository: 'microsoft/vcpkg'
         path: 'compat/vcbuild/vcpkg'
@@ -297,7 +297,7 @@ jobs:
       runs_on_pool: ${{matrix.vector.pool}}
     runs-on: ${{matrix.vector.pool}}
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: ci/install-dependencies.sh
     - run: ci/run-build-and-tests.sh
     - name: print test failures
@@ -317,7 +317,7 @@ jobs:
       CC: clang
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: ci/install-dependencies.sh
     - run: ci/run-build-and-minimal-fuzzers.sh
   dockerized:
@@ -342,7 +342,7 @@ jobs:
     runs-on: ubuntu-latest
     container: ${{matrix.vector.image}}
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
       if: matrix.vector.jobname != 'linux32'
     - uses: actions/checkout@v1
       if: matrix.vector.jobname == 'linux32'
@@ -373,7 +373,7 @@ jobs:
       group: static-analysis-${{ github.ref }}
       cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: ci/install-dependencies.sh
     - run: ci/run-static-analysis.sh
     - run: ci/check-directional-formatting.bash
@@ -396,7 +396,7 @@ jobs:
         artifact: sparse-20.04
     - name: Install the current `sparse` package
       run: sudo dpkg -i sparse-20.04/sparse_*.deb
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - name: Install other dependencies
       run: ci/install-dependencies.sh
     - run: make sparse
@@ -411,6 +411,6 @@ jobs:
       jobname: Documentation
     runs-on: ubuntu-latest
     steps:
-    - uses: actions/checkout@v3
+    - uses: actions/checkout@v4
     - run: ci/install-dependencies.sh
     - run: ci/test-documentation.sh
--
Quoted 2 lines

2.43.0-522-g2a540e432f

--
Óscar Domínguez Celada

Signature · 1 line
Óscar Domínguez Celada
#4 lore raw

Re: [PATCH 1/2] GitHub Actions: update to checkout@v4

Quoted 5 lines · Óscar Domínguez Celada

I am adding non-html e-mail reply to keep track in [email protected]:

The switch to checkout@v4 for GitHub Actions looks good to me. I wonder if we should be updating other actions to v4 so they start using Node 20:

No need to wonder. I only noticed the ones involved in the main CI job that triggered the warnings, and dealt only with the "easy" ones ;-) The primary reason why I CC'ed you was because I hoped you knew better about the "container jobs are pinned at checkout@v1", which I left as-is.

Help in updating other actions to newer versions, if needed, is greatly appreciated.

#5 lore raw

PATCH 2/2 GitHub Actions: update to github-script@v7

In reply to Junio C Hamano

We seem to be getting "Node.js 16 actions are deprecated." warnings for jobs that use github-script@v6. Update to github-script@v7, which is said to use Node.js 20.

---
 .github/workflows/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.github/workflows/main.yml +1 -1
index 90973f9693..bb857bdaf0 100644
@@ -63,7 +63,7 @@ jobs:
           echo "skip_concurrent=$skip_concurrent" >>$GITHUB_OUTPUT
       - name: skip if the commit or tree was already tested
         id: skip-if-redundant
-        uses: actions/github-script@v6
+        uses: actions/github-script@v7
         if: steps.check-ref.outputs.enabled == 'yes'
         with:
           github-token: ${{secrets.GITHUB_TOKEN}}
Signature · 1 line
2.43.0-522-g2a540e432f