From e17a038c8a75da66f7dc4c8d068b3ff0dd813455 Mon Sep 17 00:00:00 2001 From: Banks Nussman <115251059+bnussman-akamai@users.noreply.github.com> Date: Thu, 26 Sep 2024 14:38:58 -0400 Subject: [PATCH] chore: [M3-8662] - Update Github Actions actions (#11009) * update actions * add changeset --------- Co-authored-by: Banks Nussman --- .github/workflows/ci.yml | 161 ++++++++---------- .github/workflows/coverage.yml | 16 +- .github/workflows/coverage_badge.yml | 6 +- .github/workflows/coverage_comment.yml | 4 +- .github/workflows/docs.yml | 10 +- .github/workflows/e2e_schedule_and_push.yml | 8 +- .github/workflows/security_scan.yml | 2 +- .../pr-11009-tech-stories-1727310949305.md | 5 + 8 files changed, 102 insertions(+), 110 deletions(-) create mode 100644 packages/manager/.changeset/pr-11009-tech-stories-1727310949305.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 014410c88cb..962897a5748 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,11 +15,11 @@ jobs: package: ["linode-manager", "@linode/api-v4", "@linode/validation"] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "20.17" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | **/node_modules @@ -30,35 +30,32 @@ jobs: build-validation: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "20.17" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | **/node_modules key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} - run: yarn --frozen-lockfile - run: yarn workspace @linode/validation run build - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packages-validation-lib - path: | - packages/validation/index.js - packages/validation/lib + path: packages/validation/lib publish-validation: runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' - needs: - - build-validation + needs: build-validation steps: - - uses: actions/checkout@v2 - - uses: actions/download-artifact@v2 + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: name: packages-validation-lib - path: packages/validation + path: packages/validation/lib - uses: JS-DevTools/npm-publish@v1 id: npm-publish with: @@ -80,69 +77,64 @@ jobs: runs-on: ubuntu-latest needs: build-validation steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "20.17" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | **/node_modules key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} - run: yarn --frozen-lockfile - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: packages-validation-lib - path: packages/validation + path: packages/validation/lib - run: yarn workspace @linode/api-v4 run test build-sdk: runs-on: ubuntu-latest - needs: - - build-validation + needs: build-validation steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "20.17" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | **/node_modules key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: packages-validation-lib - path: packages/validation + path: packages/validation/lib - run: yarn --frozen-lockfile - run: yarn workspace @linode/api-v4 run build - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packages-api-v4-lib - path: | - packages/api-v4/index.js - packages/api-v4/index.node.js - packages/api-v4/lib + path: packages/api-v4/lib validate-sdk: runs-on: ubuntu-latest - needs: - - build-sdk + needs: build-sdk steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "20.17" # Download the validation and api-v4 artifacts (built packages) - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: packages-validation-lib - path: packages/validation - - uses: actions/download-artifact@v3 + path: packages/validation/lib + - uses: actions/download-artifact@v4 with: name: packages-api-v4-lib - path: packages/api-v4 + path: packages/api-v4/lib # Create an api-v4 tarball - run: cd packages/api-v4 && npm pack --pack-destination ../../ @@ -162,37 +154,36 @@ jobs: test-manager: runs-on: ubuntu-latest - needs: - - build-sdk + needs: build-sdk steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "20.17" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | **/node_modules key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: packages-validation-lib - path: packages/validation - - uses: actions/download-artifact@v3 + path: packages/validation/lib + - uses: actions/download-artifact@v4 with: name: packages-api-v4-lib - path: packages/api-v4 + path: packages/api-v4/lib - run: yarn --frozen-lockfile - run: yarn workspace linode-manager run test test-search: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "20.17" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | **/node_modules @@ -202,55 +193,53 @@ jobs: typecheck-manager: runs-on: ubuntu-latest - needs: - - build-sdk + needs: build-sdk steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "20.17" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | **/node_modules key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: packages-validation-lib - path: packages/validation - - uses: actions/download-artifact@v3 + path: packages/validation/lib + - uses: actions/download-artifact@v4 with: name: packages-api-v4-lib - path: packages/api-v4 + path: packages/api-v4/lib - run: yarn --frozen-lockfile - run: yarn workspace linode-manager run typecheck build-manager: runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' - needs: - - build-sdk + needs: build-sdk steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "20.17" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | **/node_modules key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: packages-validation-lib - path: packages/validation + path: packages/validation/lib - uses: actions/download-artifact@v3 with: name: packages-api-v4-lib - path: packages/api-v4 + path: packages/api-v4/lib - run: yarn --frozen-lockfile - run: yarn workspace linode-manager run build - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: packages-manager-build path: packages/manager/build @@ -264,11 +253,11 @@ jobs: # If the validation publish failed we could have mismatched versions and a broken JS client - publish-validation steps: - - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: name: packages-api-v4-lib - path: packages/api-v4 + path: packages/api-v4/lib - uses: JS-DevTools/npm-publish@v1 id: npm-publish with: @@ -288,31 +277,30 @@ jobs: build-storybook: runs-on: ubuntu-latest - needs: - - build-sdk + needs: build-sdk env: NODE_OPTIONS: --max-old-space-size=4096 steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "20.17" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | **/node_modules key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }} - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: name: packages-validation-lib - path: packages/validation - - uses: actions/download-artifact@v3 + path: packages/validation/lib + - uses: actions/download-artifact@v4 with: name: packages-api-v4-lib - path: packages/api-v4 + path: packages/api-v4/lib - run: yarn --frozen-lockfile - run: yarn workspace linode-manager run build-storybook - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: storybook-build path: packages/manager/storybook-static @@ -320,11 +308,10 @@ jobs: publish-storybook: runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' - needs: - - build-storybook + needs: build-storybook steps: - - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: name: storybook-build path: storybook/build diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 84399b8323f..144f802594d 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -7,16 +7,16 @@ jobs: if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.base_ref }} # The base branch of the PR (develop) - name: Use Node.js v20.17 LTS - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: "20.17" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | **/node_modules @@ -52,14 +52,14 @@ jobs: needs: base_branch steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js v20.17 LTS - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: "20.17" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | **/node_modules @@ -88,13 +88,13 @@ jobs: echo "$pct" > current_code_coverage.txt - name: Upload PR Number Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: pr_number path: pr_number.txt - name: Upload Current Coverage Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: current_code_coverage path: current_code_coverage.txt diff --git a/.github/workflows/coverage_badge.yml b/.github/workflows/coverage_badge.yml index 0a73b196138..ca07bfd7f27 100644 --- a/.github/workflows/coverage_badge.yml +++ b/.github/workflows/coverage_badge.yml @@ -11,14 +11,14 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Use Node.js v20.17 LTS - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: "20.17" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | **/node_modules diff --git a/.github/workflows/coverage_comment.yml b/.github/workflows/coverage_comment.yml index 07fe3682a9b..8ddd29c1ce6 100644 --- a/.github/workflows/coverage_comment.yml +++ b/.github/workflows/coverage_comment.yml @@ -15,10 +15,10 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Use Node.js v20.17 LTS - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: "20.17" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0f73e3e58b6..4a81cf374f9 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -13,12 +13,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Pages - uses: actions/configure-pages@v3 + uses: actions/configure-pages@v5 - - uses: oven-sh/setup-bun@v1 + - uses: oven-sh/setup-bun@v2 with: bun-version: 1.0.21 @@ -26,7 +26,7 @@ jobs: run: bunx vitepress@1.0.0-rc.35 build docs - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: path: docs/.vitepress/dist @@ -40,4 +40,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 \ No newline at end of file + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/e2e_schedule_and_push.yml b/.github/workflows/e2e_schedule_and_push.yml index 61176d8fb15..63578c1a25c 100644 --- a/.github/workflows/e2e_schedule_and_push.yml +++ b/.github/workflows/e2e_schedule_and_push.yml @@ -26,11 +26,11 @@ jobs: steps: - name: install command line utilities run: sudo apt-get install -y expect - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "20.17" - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | node_modules @@ -60,7 +60,7 @@ jobs: yarn build yarn start:manager:ci & - name: Run tests - uses: cypress-io/github-action@v5 + uses: cypress-io/github-action@v6 with: working-directory: packages/manager wait-on: "http://localhost:3000" diff --git a/.github/workflows/security_scan.yml b/.github/workflows/security_scan.yml index a7cb1b14fbe..37ed12a241f 100644 --- a/.github/workflows/security_scan.yml +++ b/.github/workflows/security_scan.yml @@ -12,7 +12,7 @@ jobs: container: image: returntocorp/semgrep steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Perform scanning using Semgrep # Pass even when it identifies issues or encounters errors. diff --git a/packages/manager/.changeset/pr-11009-tech-stories-1727310949305.md b/packages/manager/.changeset/pr-11009-tech-stories-1727310949305.md new file mode 100644 index 00000000000..4ad6da2dfc5 --- /dev/null +++ b/packages/manager/.changeset/pr-11009-tech-stories-1727310949305.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Tech Stories +--- + +Update Github Actions actions ([#11009](https://github.com/linode/manager/pull/11009))