From 66709d76f0134c4668a9a7a80555240be5ecb3b1 Mon Sep 17 00:00:00 2001 From: Peter Harrison <16875803+palisadoes@users.noreply.github.com> Date: Mon, 19 Feb 2024 10:24:41 -0800 Subject: [PATCH] Updated github actions to the latest versions (#1875) * Fixes #1559 * Fixes #1559 * Removed the ts-node dependency * Removed the ts-node dependency * Upgraded github actions to the latest versions --------- Co-authored-by: Peter Harrison --- .github/workflows/ci.yml.archive | 2 +- .github/workflows/codeql-codescan.yml | 2 +- .github/workflows/pull-request.yml | 16 ++++++++-------- .github/workflows/pull_changes.yml | 2 +- .github/workflows/push-documentation.yml | 6 +++--- .github/workflows/push.yml | 16 ++++++++-------- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml.archive b/.github/workflows/ci.yml.archive index d356e8e320..47f13303ed 100644 --- a/.github/workflows/ci.yml.archive +++ b/.github/workflows/ci.yml.archive @@ -30,7 +30,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: akhileshns/heroku-deploy@v3.12.12 # This is the action with: heroku_api_key: ${{secrets.HEROKU_API_KEY}} diff --git a/.github/workflows/codeql-codescan.yml b/.github/workflows/codeql-codescan.yml index ce91f01c43..272e67db8b 100644 --- a/.github/workflows/codeql-codescan.yml +++ b/.github/workflows/codeql-codescan.yml @@ -35,7 +35,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3ebf43d7f0..e0acdb1a53 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository content - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 2 @@ -35,7 +35,7 @@ jobs: - name: Restore node_modules from cache id: cache-npm - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: @@ -80,14 +80,14 @@ jobs: BASE_BRANCH: ${{ github.event.pull_request.base.ref }} steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Checkout code run: git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-branch working-directory: ${{ github.workspace }} - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.11.6' @@ -145,7 +145,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Generate Access Token Secret run: echo "ACCESS_TOKEN_SECRET=$(openssl rand -hex 32)" >> $GITHUB_ENV @@ -154,7 +154,7 @@ jobs: run: echo "REFRESH_TOKEN_SECRET=$(openssl rand -hex 32)" >> $GITHUB_ENV - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 - name: Install dependencies run: npm ci @@ -194,7 +194,7 @@ jobs: run: npm run import:sample-data - name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}} - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: verbose: true token: ${{ secrets.CODECOV_TOKEN }} @@ -212,7 +212,7 @@ jobs: runs-on: ubuntu-latest needs: Test-Application steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: 'Check whether comments exists for JSDocs' run: | chmod +x ./.github/workflows/check-jsdocs-comment.py diff --git a/.github/workflows/pull_changes.yml b/.github/workflows/pull_changes.yml index 006cd1ad25..b320774a7a 100644 --- a/.github/workflows/pull_changes.yml +++ b/.github/workflows/pull_changes.yml @@ -9,7 +9,7 @@ jobs: if: github.ref == 'refs/heads/automated-docs' # needs: Generate-Documentation steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: dmnemec/copy_file_to_another_repo_action@v1.1.1 env: API_TOKEN_GITHUB: ${{secrets.TALAWA_DOCS_SYNC}} diff --git a/.github/workflows/push-documentation.yml b/.github/workflows/push-documentation.yml index 4b5e416abb..04a35eba0d 100644 --- a/.github/workflows/push-documentation.yml +++ b/.github/workflows/push-documentation.yml @@ -48,7 +48,7 @@ jobs: # This is done as we will use the Talawa-Docs repository later too steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: token: ${{ secrets.TALAWA_DOCS_SYNC }} path: api @@ -60,7 +60,7 @@ jobs: run: echo "REFRESH_TOKEN_SECRET=$(openssl rand -hex 32)" >> $GITHUB_ENV - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 # Move into the api folder before installing the dependencies - name: Install dependencies @@ -103,7 +103,7 @@ jobs: # We will clone the Talawa Docs in the folder called docs so that we can copy the generated # schema.json into the same later - name: Checkout the Talawa-Docs repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: PalisadoesFoundation/talawa-docs token: ${{ secrets.TALAWA_DOCS_SYNC }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index d87f13334f..553c5adbe7 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -61,7 +61,7 @@ jobs: # This is done as we will use the Talawa-Docs repository later too steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Generate Access Token Secret run: echo "ACCESS_TOKEN_SECRET=$(openssl rand -hex 32)" >> $GITHUB_ENV @@ -70,7 +70,7 @@ jobs: run: echo "REFRESH_TOKEN_SECRET=$(openssl rand -hex 32)" >> $GITHUB_ENV - name: Set up Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 - name: Install dependencies run: npm ci @@ -86,7 +86,7 @@ jobs: # Upload Coverage - name: Present and upload coverage to Codecov as ${{env.CODECOV_UNIQUE_NAME}} - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} verbose: true @@ -100,7 +100,7 @@ jobs: needs: Push-Workflow steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # with: # persist-credentials: false - name: Generate Documentation of HTML pages @@ -158,7 +158,7 @@ jobs: if: github.ref == 'refs/heads/develop' steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: persist-credentials: false token: ${{ secrets.TALAWA_DOCS_SYNC }} @@ -175,7 +175,7 @@ jobs: if: github.ref == 'refs/heads/automated-docs' && contains(github.event.head_commit.message, 'Trigger Documentation Workflow') needs : Generate-Documentation steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: dmnemec/copy_file_to_another_repo_action@main env: API_TOKEN_GITHUB: ${{secrets.TALAWA_DOCS_SYNC}} @@ -230,11 +230,11 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Restore node_modules from cache id: cache-npm - uses: actions/cache@v3 + uses: actions/cache@v4 env: cache-name: cache-node-modules with: