ci: Upgrade GitHub Action steps to github-script@v7 and pload-artifact@v4 (#33554)

## Description
> [!TIP]  
> _Add a TL;DR when the description is longer than 500 words or
extremely technical (helps the content, marketing, and DevRel team)._
>
> _Please also include relevant motivation and context. List any
dependencies that are required for this change. Add links to Notion,
Figma or any other documents that might be relevant to the PR._


Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags=""

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!CAUTION]  
> If you modify the content in this section, you are likely to disrupt
the CI result for your PR.

<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No

---------

Co-authored-by: yatinappsmith <84702014+yatinappsmith@users.noreply.github.com>
This commit is contained in:
Arpit Mohan 2024-05-20 10:49:27 +05:30 committed by GitHub
parent 16cd15a103
commit 6aeb456c62
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
13 changed files with 44 additions and 44 deletions

View File

@ -174,7 +174,7 @@ jobs:
DB_PWD: ${{ secrets.CYPRESS_DB_PWD }}
RUN_ID: ${{ github.run_id }}
ATTEMPT_NUMBER: ${{ github.run_attempt }}
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { Pool } = require("pg");
@ -216,7 +216,7 @@ jobs:
# This is done for debugging.
- name: upload combined failed spec
if: needs.ci-test-limited.result != 'success'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: combined_failed_spec_ci
path: ~/combined_failed_spec_ci
@ -291,7 +291,7 @@ jobs:
DB_PWD: ${{ secrets.CYPRESS_DB_PWD }}
RUN_ID: ${{ github.run_id }}
ATTEMPT_NUMBER: ${{ github.run_attempt }}
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { Pool } = require("pg");
@ -333,7 +333,7 @@ jobs:
# This is done for debugging.
- name: upload combined failed spec
if: needs.ci-test-limited-existing-docker-image.result != 'success'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: combined_failed_spec_ci
path: ~/combined_failed_spec_ci

View File

@ -38,7 +38,7 @@ jobs:
- name: Download the client build artifact
if: steps.run_result.outputs.run_result != 'success'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: client-build
path: app/client
@ -51,14 +51,14 @@ jobs:
- name: Download the server build artifact
if: steps.run_result.outputs.run_result != 'success'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: server-build
path: app/server/dist/
- name: Download the rts build artifact
if: steps.run_result.outputs.run_result != 'success'
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: rts-dist
path: app/client/packages/rts/dist

View File

@ -364,7 +364,7 @@ jobs:
- name: Upload failed test cypress logs artifact
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cypress-console-logs
path: ${{ github.workspace }}/app/client/cypress/cypress-logs
@ -379,7 +379,7 @@ jobs:
# Upload docker logs
- name: Upload failed test list artifact
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dockerlogs
path: ~/dockerlogs
@ -392,7 +392,7 @@ jobs:
- name: Upload cypress report
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: results-${{github.run_attempt}}
path: ~/results
@ -415,7 +415,7 @@ jobs:
# Upload the log artifact so that it can be used by the test & deploy job in the workflow
- name: Upload server logs bundle on failure
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: server-logs-${{ matrix.job }}

View File

@ -256,14 +256,14 @@ jobs:
- name: Upload cypress report
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: results-${{github.run_attempt}}
path: ~/results
- name: Upload cypress snapshots
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: snapshots
path: ${{ github.workspace }}/app/client/cypress/snapshots

View File

@ -367,14 +367,14 @@ jobs:
- name: Upload failed test cypress logs artifact
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cypress-console-logs
path: ${{ github.workspace }}/app/client/cypress/cypress-logs
- name: Upload cypress snapshots
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: snapshots
path: ${{ github.workspace }}/app/client/cypress/snapshots
@ -389,7 +389,7 @@ jobs:
# Upload docker logs
- name: Upload failed test list artifact
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dockerlogs
path: ~/dockerlogs
@ -402,7 +402,7 @@ jobs:
- name: Upload cypress report
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: results-${{github.run_attempt}}
path: ~/results
@ -426,7 +426,7 @@ jobs:
# Upload the log artifact so that it can be used by the test & deploy job in the workflow
- name: Upload server logs bundle on failure
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: server-logs-${{ matrix.job }}

View File

@ -290,7 +290,7 @@ jobs:
# Upload the build artifact so that it can be used by the test & deploy job in the workflow
- name: Upload react build bundle
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: client-build
path: app/client/build.tar

View File

@ -12,7 +12,7 @@ jobs:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
github-token: ${{ secrets.CLOSE_LABELER_GITHUB_TOKEN }}
script: |

View File

@ -89,7 +89,7 @@ jobs:
# Upload the build artifact so that it can be used by the test & deploy job in the workflow
- name: Upload react build bundle
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: client-build
path: app/client/build.tar
@ -136,7 +136,7 @@ jobs:
ls -l dist
- name: Upload server build bundle
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: server-build
path: app/server/dist/
@ -189,7 +189,7 @@ jobs:
# Upload the build artifacts and dependencies so that it can be used by the test & deploy job in other workflows
- name: Upload rts build bundle
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: rts-dist
path: app/client/packages/rts/rts-dist.tar
@ -210,7 +210,7 @@ jobs:
uses: depot/setup-action@v1
- name: Download the client build artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: client-build
path: app/client
@ -223,13 +223,13 @@ jobs:
rm app/client/build.tar
- name: Download the server build artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: server-build
path: app/server/dist
- name: Download the rts build artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: rts-dist
path: app/client/packages/rts/dist

View File

@ -94,7 +94,7 @@ jobs:
run: |
vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | tee -a ~/run_result.txt
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
const dpUrl = require("fs").readFileSync(process.env.HOME + "/run_result.txt", "utf8")
@ -134,7 +134,7 @@ jobs:
run: echo "git_hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Download the client build artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: client-build
path: app/client
@ -146,13 +146,13 @@ jobs:
tar -xvf app/client/build.tar -C app/client/build
- name: Download the server build artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: server-build
path: app/server/dist
- name: Download the rts build artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: rts-dist
path: app/client/packages/rts/dist

View File

@ -104,7 +104,7 @@ jobs:
DB_PWD: ${{ secrets.CYPRESS_DB_PWD }}
RUN_ID: ${{ github.run_id }}
ATTEMPT_NUMBER: ${{ github.run_attempt }}
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { Pool } = require("pg");
@ -151,7 +151,7 @@ jobs:
# This is done for debugging
- name: Upload combined failed spec
if: needs.ci-test.result != 'success'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: combined_failed_spec_ci
path: ~/combined_failed_spec_ci

View File

@ -149,7 +149,7 @@ jobs:
# Upload the build artifacts and dependencies so that it can be used by the test & deploy job in other workflows
- name: Upload rts build bundle
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: rts-dist
path: app/client/packages/rts/rts-dist.tar

View File

@ -108,7 +108,7 @@ jobs:
- name: Download the failed test artifact in case of rerun
if: steps.run_result.outputs.run_result == 'failedtest' && (steps.changed-files-specific.outputs.any_changed == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule')
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: failed-server-tests
path: ~/failed-server-tests
@ -222,7 +222,7 @@ jobs:
- name: Upload the failed tests report
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: failed-server-tests
path: app/server/failed-server-tests.txt
@ -262,7 +262,7 @@ jobs:
# Upload the build artifact so that it can be used by the test & deploy job in the workflow
- name: Upload server build bundle
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: server-build
path: app/server/dist/

View File

@ -153,7 +153,7 @@ jobs:
rm -f ~/combined_failed_spec_ci
# Download failed_spec_ci list for all CI container jobs
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
if: needs.ci-test.result != 'success'
id: download_ci
with:
@ -257,7 +257,7 @@ jobs:
# This is done for debugging.
- name: upload combined failed spec
if: needs.ci-test.result != 'success'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: combined_failed_spec_ci
path: ~/combined_failed_spec_ci
@ -292,7 +292,7 @@ jobs:
uses: actions/checkout@v4
- name: Download the react build artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: client-build
path: app/client
@ -304,13 +304,13 @@ jobs:
tar -xvf app/client/build.tar -C app/client/build
- name: Download the server build artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: server-build
path: app/server/dist
- name: Download the rts build artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: rts-dist
path: app/client/packages/rts/dist
@ -367,7 +367,7 @@ jobs:
uses: actions/checkout@v4
- name: Download the react build artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: client-build
path: app/client
@ -379,13 +379,13 @@ jobs:
tar -xvf app/client/build.tar -C app/client/build
- name: Download the server build artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: server-build
path: app/server/dist
- name: Download the rts build artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: rts-dist
path: app/client/packages/rts/dist