Browse Source

Update GH actions (#8743)

* Update GH actions

Deprecated actions changed

* Update in all workflows

* More actions updated
Joan Miquel 1 year ago
parent
commit
6fef5f22d2

+ 5 - 5
.github/workflows/build.yml

@@ -10,7 +10,7 @@ jobs:
         run: |
         run: |
           mkdir -p ./pr
           mkdir -p ./pr
           echo ${{ github.event.number }} > ./pr/NR
           echo ${{ github.event.number }} > ./pr/NR
-      - uses: actions/upload-artifact@v2
+      - uses: actions/upload-artifact@v4
         if: github.event_name == 'pull_request'
         if: github.event_name == 'pull_request'
         with:
         with:
           name: pr
           name: pr
@@ -20,7 +20,7 @@ jobs:
       #
       #
       # We need to fetch more than one commit to be able to access HEAD^2 in case
       # We need to fetch more than one commit to be able to access HEAD^2 in case
       # of a pull request
       # of a pull request
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
         with:
         with:
           fetch-depth: 10
           fetch-depth: 10
       # In case of a push event, the commit we care about is simply HEAD.
       # In case of a push event, the commit we care about is simply HEAD.
@@ -46,7 +46,7 @@ jobs:
           echo "$(git log --format=%B -n 1 HEAD^2)" >> $GITHUB_ENV
           echo "$(git log --format=%B -n 1 HEAD^2)" >> $GITHUB_ENV
           echo "EOF" >> $GITHUB_ENV
           echo "EOF" >> $GITHUB_ENV
           echo "PREVIOUS_COMMIT=$(git log --format=%H -n 1 HEAD^2~1)" >> $GITHUB_ENV
           echo "PREVIOUS_COMMIT=$(git log --format=%H -n 1 HEAD^2~1)" >> $GITHUB_ENV
-      - uses: actions/setup-python@v4
+      - uses: actions/setup-python@v5
         with:
         with:
           python-version: '3.10'
           python-version: '3.10'
           architecture: 'x64'
           architecture: 'x64'
@@ -110,10 +110,10 @@ jobs:
       PREVIOUS_COMMIT: ${{ needs.setup.outputs.previous_commit }}
       PREVIOUS_COMMIT: ${{ needs.setup.outputs.previous_commit }}
       PR_NUMBER: ${{ github.event.pull_request.number }}
       PR_NUMBER: ${{ github.event.pull_request.number }}
     steps:
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
         with:
         with:
           fetch-depth: 10
           fetch-depth: 10
-      - uses: actions/setup-python@v4
+      - uses: actions/setup-python@v5
         with:
         with:
           python-version: '3.10'
           python-version: '3.10'
           architecture: 'x64'
           architecture: 'x64'

+ 3 - 3
.github/workflows/get-maintainers.yml

@@ -8,7 +8,7 @@ jobs:
   get_maintainers:
   get_maintainers:
     runs-on: ubuntu-22.04
     runs-on: ubuntu-22.04
     steps:
     steps:
-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4
         with:
         with:
           fetch-depth: 10
           fetch-depth: 10
       - name: Get commit branch and commit message from PR
       - name: Get commit branch and commit message from PR
@@ -19,7 +19,7 @@ jobs:
           echo "$(git log --format=%B -n 1 HEAD^2)" >> $GITHUB_ENV
           echo "$(git log --format=%B -n 1 HEAD^2)" >> $GITHUB_ENV
           echo "EOF" >> $GITHUB_ENV
           echo "EOF" >> $GITHUB_ENV
           echo "PREVIOUS_COMMIT=$(git log --format=%H -n 1 HEAD^2~1)" >> $GITHUB_ENV
           echo "PREVIOUS_COMMIT=$(git log --format=%H -n 1 HEAD^2~1)" >> $GITHUB_ENV
-      - uses: actions/setup-python@v4
+      - uses: actions/setup-python@v5
         with:
         with:
           python-version: '3.10'
           python-version: '3.10'
           architecture: 'x64'
           architecture: 'x64'
@@ -31,7 +31,7 @@ jobs:
         run: |
         run: |
           python ./toolset/github_actions/get_maintainers.py > ./maintainers/maintainers.md
           python ./toolset/github_actions/get_maintainers.py > ./maintainers/maintainers.md
       - name: Save Maintainers
       - name: Save Maintainers
-        uses: actions/upload-artifact@v3
+        uses: actions/upload-artifact@v4
         with:
         with:
           name: maintainers
           name: maintainers
           path: maintainers/
           path: maintainers/

+ 2 - 2
.github/workflows/label-failing-pr.yml

@@ -10,7 +10,7 @@ jobs:
     runs-on: ubuntu-22.04
     runs-on: ubuntu-22.04
     steps:
     steps:
       - name: 'Download artifact'
       - name: 'Download artifact'
-        uses: actions/github-script@v3.1.0
+        uses: actions/github-script@v7
         with:
         with:
           # scripts lightly modified from https://securitylab.github.com/research/github-actions-preventing-pwn-requests
           # scripts lightly modified from https://securitylab.github.com/research/github-actions-preventing-pwn-requests
           script: |
           script: |
@@ -32,7 +32,7 @@ jobs:
             fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
             fs.writeFileSync('${{github.workspace}}/pr.zip', Buffer.from(download.data));
       - run: unzip pr.zip
       - run: unzip pr.zip
       - name: Label PR
       - name: Label PR
-        uses: actions/github-script@v3
+        uses: actions/github-script@v7
         with:
         with:
           github-token: ${{ secrets.GITHUB_TOKEN }}
           github-token: ${{ secrets.GITHUB_TOKEN }}
           script: |
           script: |

+ 2 - 2
.github/workflows/ping-maintainers.yml

@@ -11,7 +11,7 @@ jobs:
     runs-on: ubuntu-22.04
     runs-on: ubuntu-22.04
     steps:
     steps:
       - name: 'Download maintainers artifact'
       - name: 'Download maintainers artifact'
-        uses: actions/github-script@v6
+        uses: actions/github-script@v7
         with:
         with:
           script: |
           script: |
             let artifacts = await github.rest.actions.listWorkflowRunArtifacts({
             let artifacts = await github.rest.actions.listWorkflowRunArtifacts({
@@ -32,7 +32,7 @@ jobs:
             fs.writeFileSync('${{github.workspace}}/maintainers.zip', Buffer.from(download.data));
             fs.writeFileSync('${{github.workspace}}/maintainers.zip', Buffer.from(download.data));
       - run: unzip maintainers.zip
       - run: unzip maintainers.zip
       - name: Ping maintainers
       - name: Ping maintainers
-        uses: actions/github-script@v6
+        uses: actions/github-script@v7
         with:
         with:
           github-token: ${{ secrets.GITHUB_TOKEN }}
           github-token: ${{ secrets.GITHUB_TOKEN }}
           script: |
           script: |