From b922d76881fce4552329232e89b5f61c31800237 Mon Sep 17 00:00:00 2001 From: Danielle Adams Date: Wed, 6 Mar 2024 17:11:02 -0700 Subject: [PATCH] ARCH-2011 - Update to node20 +semver:minor --- .../did-custom-action-code-change/action.yml | 2 +- .../update-action-version-in-file/action.yml | 2 +- .../reusable-build-and-review-pr.yml | 12 +++++----- .../reusable-increment-version-on-merge.yml | 6 ++--- .github/workflows/test-custom-actions.yml | 24 +++++++++---------- 5 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/actions/did-custom-action-code-change/action.yml b/.github/actions/did-custom-action-code-change/action.yml index ab13b5d..cbc3669 100644 --- a/.github/actions/did-custom-action-code-change/action.yml +++ b/.github/actions/did-custom-action-code-change/action.yml @@ -26,5 +26,5 @@ outputs: HAS_CHANGES: description: 'Flag indicating whether changes were found in the code files or code folders.' runs: - using: 'node16' + using: 'node20' main: 'dist/index.js' diff --git a/.github/actions/update-action-version-in-file/action.yml b/.github/actions/update-action-version-in-file/action.yml index b949402..4544061 100644 --- a/.github/actions/update-action-version-in-file/action.yml +++ b/.github/actions/update-action-version-in-file/action.yml @@ -21,5 +21,5 @@ outputs: description: 'The updated file content after replacements are made.' runs: - using: 'node16' + using: 'node20' main: 'dist/index.js' diff --git a/.github/workflows/reusable-build-and-review-pr.yml b/.github/workflows/reusable-build-and-review-pr.yml index 4d612f1..9ee0580 100644 --- a/.github/workflows/reusable-build-and-review-pr.yml +++ b/.github/workflows/reusable-build-and-review-pr.yml @@ -65,7 +65,7 @@ on: description: The version of node to build the action with. required: false type: string - default: '16.x' + default: '20.x' jobs: setup: @@ -76,7 +76,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -141,16 +141,16 @@ jobs: - name: Checkout if: env.HAS_CODE_CHANGES == 'true' - uses: actions/checkout@v3 + uses: actions/checkout@v4 # ----------------------------------- # Check if action has been recompiled # ----------------------------------- - name: If action has build step - Setup Node ${{ inputs.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 if: env.HAS_CODE_CHANGES == 'true' && env.HAS_BUILD_STEP == 'true' with: - node-version: ${{ inputs.node-version }} # Default is 16.x + node-version: ${{ inputs.node-version }} # Default is 20.x - name: If action has build step - Build the action if: env.HAS_CODE_CHANGES == 'true' && env.HAS_BUILD_STEP == 'true' @@ -194,7 +194,7 @@ jobs: - name: Fail the workflow if there are any outstanding changes if: env.HAS_CODE_CHANGES == 'true' && (env.NEEDS_BUILD_COMMIT == 'true' || env.NEEDS_README_COMMIT == 'true') id: summary - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | diff --git a/.github/workflows/reusable-increment-version-on-merge.yml b/.github/workflows/reusable-increment-version-on-merge.yml index b53b7b0..192871f 100644 --- a/.github/workflows/reusable-increment-version-on-merge.yml +++ b/.github/workflows/reusable-increment-version-on-merge.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Check if merge to default branch id: merge - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | const defaultBranch = '${{ inputs.default-branch }}'; @@ -60,7 +60,7 @@ jobs: - name: Checkout if: env.MERGE_TO_MAIN == 'true' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: If PR is merged to ${{ inputs.default-branch }} - Check for code changes to the action source code if: env.MERGE_TO_MAIN == 'true' @@ -82,7 +82,7 @@ jobs: - name: If PR is merged to ${{ inputs.default-branch }} & PR has source code changes - Checkout if: env.MERGE_TO_MAIN == 'true' && steps.source-code.outputs.HAS_CHANGES == 'true' - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/test-custom-actions.yml b/.github/workflows/test-custom-actions.yml index e7070bc..04102e5 100644 --- a/.github/workflows/test-custom-actions.yml +++ b/.github/workflows/test-custom-actions.yml @@ -41,7 +41,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: PR Source - ${{ env.PR_SOURCE }} run: echo "PRs can come from a branch or a fork. This PR is from a ${{ env.PR_SOURCE }}." @@ -74,11 +74,11 @@ jobs: # ----------------------------------- # Check if action has been recompiled # ----------------------------------- - - name: Setup Node 16.x - uses: actions/setup-node@v3 + - name: Setup Node 20.x + uses: actions/setup-node@v4 if: env.HAS_CHANGES == 'true' with: - node-version: 16.x + node-version: 20.x - name: Build the action if: env.HAS_CHANGES == 'true' @@ -101,7 +101,7 @@ jobs: - name: Fail the workflow if the action needs to be recompiled if: env.HAS_CHANGES == 'true' && env.NEEDS_BUILD_COMMIT == 'true' id: summary - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | @@ -165,7 +165,7 @@ jobs: - name: Setup - Checkout if: always() && env.HAS_CHANGES == 'true' - uses: actions/checkout@v3 + uses: actions/checkout@v4 # ------------------------------------------- # FULL FILE PATH THAT MATCHES @@ -345,7 +345,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: PR Source - ${{ env.PR_SOURCE }} run: echo "PRs can come from a branch or a fork. This PR is from a ${{ env.PR_SOURCE }}." @@ -378,11 +378,11 @@ jobs: # ----------------------------------- # Check if action has been recompiled # ----------------------------------- - - name: Setup Node 16.x - uses: actions/setup-node@v3 + - name: Setup Node 20.x + uses: actions/setup-node@v4 if: env.HAS_CHANGES == 'true' with: - node-version: 16.x + node-version: 20.x - name: Build the action if: env.HAS_CHANGES == 'true' @@ -405,7 +405,7 @@ jobs: - name: Fail the workflow if the action needs to be recompiled if: env.HAS_CHANGES == 'true' && env.NEEDS_BUILD_COMMIT == 'true' id: summary - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | @@ -459,7 +459,7 @@ jobs: - name: Setup - Checkout if: always() && env.HAS_CHANGES == 'true' - uses: actions/checkout@v3 + uses: actions/checkout@v4 #-------------------------------------- # FILE HAS CHANGES