From c78af13c1e303b3b28bc22e1f7d6bf3347ef745f Mon Sep 17 00:00:00 2001 From: Jiralite <33201955+Jiralite@users.noreply.github.com> Date: Mon, 13 May 2024 10:35:25 +0100 Subject: [PATCH] ci: Update versions of actions (#10270) * ci: update versions of actions * ci: attempt fix --- .github/workflows/cleanup-cache.yml | 2 +- .github/workflows/deploy-website.yml | 8 ++-- .github/workflows/deprecate-version.yml | 8 ++-- .github/workflows/documentation.yml | 20 ++++---- .github/workflows/issue-triage.yml | 2 +- .github/workflows/label-sync.yml | 4 +- .github/workflows/lock.yml | 2 +- .github/workflows/pr-triage.yml | 2 +- .github/workflows/publish-dev-docker.yml | 10 ++-- .github/workflows/publish-dev.yml | 8 ++-- .github/workflows/publish-docker.yml | 10 ++-- .github/workflows/publish-release.yml | 8 ++-- .github/workflows/tests.yml | 10 ++-- packages/actions/src/pnpmCache/action.yml | 4 +- .../actions/src/uploadCoverage/action.yml | 46 +++++++++++++------ packages/actions/src/yarnCache/action.yml | 4 +- 16 files changed, 84 insertions(+), 64 deletions(-) diff --git a/.github/workflows/cleanup-cache.yml b/.github/workflows/cleanup-cache.yml index 55aa79741..93fedb93e 100644 --- a/.github/workflows/cleanup-cache.yml +++ b/.github/workflows/cleanup-cache.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Cleanup caches run: | diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml index 842713510..d1b30bca3 100644 --- a/.github/workflows/deploy-website.yml +++ b/.github/workflows/deploy-website.yml @@ -14,12 +14,12 @@ jobs: if: github.repository_owner == 'discordjs' steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install Node.js v18 - uses: actions/setup-node@v3 + - name: Install Node.js v20 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 - name: Install dependencies uses: ./packages/actions/src/pnpmCache diff --git a/.github/workflows/deprecate-version.yml b/.github/workflows/deprecate-version.yml index b78890378..e1dc1d00d 100644 --- a/.github/workflows/deprecate-version.yml +++ b/.github/workflows/deprecate-version.yml @@ -34,12 +34,12 @@ jobs: if: github.repository_owner == 'discordjs' steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install Node.js v18 - uses: actions/setup-node@v3 + - name: Install Node.js v20 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 - name: Install dependencies uses: ./packages/actions/src/pnpmCache diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index b2692239a..2ae3c5d10 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -36,14 +36,14 @@ jobs: if: github.repository_owner == 'discordjs' steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ inputs.ref || '' }} - - name: Install node.js v18 - uses: actions/setup-node@v3 + - name: Install Node.js v20 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 - name: Install dependencies uses: ./packages/actions/src/pnpmCache @@ -53,7 +53,7 @@ jobs: - name: Checkout main repository if: ${{ inputs.ref && inputs.ref != 'main' }} - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: 'main' @@ -93,7 +93,7 @@ jobs: done - name: Checkout docs repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: 'discordjs/docs' token: ${{ secrets.DJS_DOCS }} @@ -211,12 +211,12 @@ jobs: if: github.repository_owner == 'discordjs' steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install node.js v18 - uses: actions/setup-node@v3 + - name: Install Node.js v20 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 - name: Install dependencies uses: ./packages/actions/src/pnpmCache diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml index a684a2954..7dd9b1ce7 100644 --- a/.github/workflows/issue-triage.yml +++ b/.github/workflows/issue-triage.yml @@ -6,7 +6,7 @@ jobs: issue-triage: runs-on: ubuntu-latest steps: - - uses: github/issue-labeler@v3.2 + - uses: github/issue-labeler@v3.4 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' configuration-path: .github/issue-labeler.yml diff --git a/.github/workflows/label-sync.yml b/.github/workflows/label-sync.yml index 5a9e1cf0e..e7cf080d5 100644 --- a/.github/workflows/label-sync.yml +++ b/.github/workflows/label-sync.yml @@ -15,9 +15,9 @@ jobs: if: github.repository_owner == 'discordjs' steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Label sync - uses: crazy-max/ghaction-github-labeler@v4 + uses: crazy-max/ghaction-github-labeler@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 2a50b7b8a..214737cb3 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -11,7 +11,7 @@ jobs: permissions: issues: write steps: - - uses: dessant/lock-threads@v4 + - uses: dessant/lock-threads@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} issue-inactive-days: 365 diff --git a/.github/workflows/pr-triage.yml b/.github/workflows/pr-triage.yml index 7b41a5834..0ceab25aa 100644 --- a/.github/workflows/pr-triage.yml +++ b/.github/workflows/pr-triage.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Automatically label PR - uses: actions/labeler@v4 + uses: actions/labeler@v5 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' sync-labels: true diff --git a/.github/workflows/publish-dev-docker.yml b/.github/workflows/publish-dev-docker.yml index 91b945fb7..9a99c7fef 100644 --- a/.github/workflows/publish-dev-docker.yml +++ b/.github/workflows/publish-dev-docker.yml @@ -10,18 +10,18 @@ jobs: if: github.repository_owner == 'discordjs' steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install node.js v18 - uses: actions/setup-node@v3 + - name: Install Node.js v20 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 - name: Install dependencies uses: ./packages/actions/src/pnpmCache - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin diff --git a/.github/workflows/publish-dev.yml b/.github/workflows/publish-dev.yml index 7482c76a4..202073c92 100644 --- a/.github/workflows/publish-dev.yml +++ b/.github/workflows/publish-dev.yml @@ -43,14 +43,14 @@ jobs: if: github.repository_owner == 'discordjs' steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install node.js v18 - uses: actions/setup-node@v3 + - name: Install Node.js v20 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 registry-url: https://registry.npmjs.org/ - name: Check the current development version diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 421fc4883..e3a65a143 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -7,18 +7,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install node.js v18 - uses: actions/setup-node@v3 + - name: Install Node.js v20 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 - name: Install dependencies uses: ./packages/actions/src/pnpmCache - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub run: echo ${{ secrets.DOCKER_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 2960253dc..60165e26b 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -14,12 +14,12 @@ jobs: if: github.repository_owner == 'discordjs' steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - name: Install node.js v18 - uses: actions/setup-node@v3 + - name: Install Node.js v20 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 registry-url: https://registry.npmjs.org/ - name: Install dependencies diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 52f193f1f..4ea93cab4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,14 +15,14 @@ jobs: TURBO_TEAM: ${{ secrets.TURBO_TEAM }} steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Install node.js v18 - uses: actions/setup-node@v3 + - name: Install Node.js v20 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: 20 - name: Install dependencies uses: ./packages/actions/src/pnpmCache @@ -62,3 +62,5 @@ jobs: - name: Upload Coverage if: github.repository_owner == 'discordjs' uses: ./packages/actions/src/uploadCoverage + with: + codecov_token: ${{ secrets.CODECOV_TOKEN }} diff --git a/packages/actions/src/pnpmCache/action.yml b/packages/actions/src/pnpmCache/action.yml index 89477f871..5b8db0b0a 100644 --- a/packages/actions/src/pnpmCache/action.yml +++ b/packages/actions/src/pnpmCache/action.yml @@ -9,7 +9,7 @@ runs: with: swap-size-gb: 10 - - uses: pnpm/action-setup@v2.2.4 + - uses: pnpm/action-setup@v4.0.0 name: Install pnpm with: run_install: false @@ -26,7 +26,7 @@ runs: run: | echo "YEAR_MONTH=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 name: Setup pnpm cache with: path: ${{ steps.pnpm-config.outputs.STORE_PATH }} diff --git a/packages/actions/src/uploadCoverage/action.yml b/packages/actions/src/uploadCoverage/action.yml index a8406ad55..54a2e55c9 100644 --- a/packages/actions/src/uploadCoverage/action.yml +++ b/packages/actions/src/uploadCoverage/action.yml @@ -1,88 +1,106 @@ name: 'Upload Coverage' description: 'Uploads code coverage reports to codecov with separate flags for separate packages' +inputs: + codecov_token: + description: 'Codecov token.' + required: true runs: using: 'composite' steps: - name: Upload Guide Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./apps/guide/coverage/cobertura-coverage.xml flags: guide + token: ${{ inputs.CODECOV_TOKEN }} - name: Upload Website Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./apps/website/coverage/cobertura-coverage.xml flags: website + token: ${{ inputs.CODECOV_TOKEN }} - name: Upload Brokers Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./packages/brokers/coverage/cobertura-coverage.xml flags: brokers + token: ${{ inputs.CODECOV_TOKEN }} - name: Upload Builders Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./packages/builders/coverage/cobertura-coverage.xml flags: builders + token: ${{ inputs.CODECOV_TOKEN }} - name: Upload Collection Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./packages/collection/coverage/cobertura-coverage.xml flags: collection + token: ${{ inputs.CODECOV_TOKEN }} - name: Upload Discord.js Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./packages/discord.js/coverage/cobertura-coverage.xml flags: discord.js + token: ${{ inputs.CODECOV_TOKEN }} - name: Upload Formatters Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./packages/formatters/coverage/cobertura-coverage.xml flags: formatters + token: ${{ inputs.CODECOV_TOKEN }} - name: Upload Next Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./packages/next/coverage/cobertura-coverage.xml flags: next + token: ${{ inputs.CODECOV_TOKEN }} - name: Upload Proxy Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./packages/proxy/coverage/cobertura-coverage.xml flags: proxy + token: ${{ inputs.CODECOV_TOKEN }} - name: Upload Rest Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./packages/rest/coverage/cobertura-coverage.xml flags: rest + token: ${{ inputs.CODECOV_TOKEN }} - name: Upload Voice Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./packages/voice/coverage/cobertura-coverage.xml flags: voice + token: ${{ inputs.CODECOV_TOKEN }} - name: Upload WS Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./packages/ws/coverage/cobertura-coverage.xml flags: ws + token: ${{ inputs.CODECOV_TOKEN }} - name: Upload Util Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./packages/util/coverage/cobertura-coverage.xml flags: util + token: ${{ inputs.CODECOV_TOKEN }} - name: Upload Utilities Coverage - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: files: ./packages/actions/coverage/cobertura-coverage.xml, ./packages/scripts/coverage/cobertura-coverage.xml flags: utilities + token: ${{ inputs.CODECOV_TOKEN }} diff --git a/packages/actions/src/yarnCache/action.yml b/packages/actions/src/yarnCache/action.yml index 40346eed4..50c880ed8 100644 --- a/packages/actions/src/yarnCache/action.yml +++ b/packages/actions/src/yarnCache/action.yml @@ -21,7 +21,7 @@ runs: echo "NPM_GLOBAL_CACHE_FOLDER=$(npm config get cache)" >> $GITHUB_OUTPUT - name: Restore yarn cache - uses: actions/cache@v3 + uses: actions/cache@v4 id: yarn-download-cache with: path: ${{ steps.yarn-config.outputs.CACHE_FOLDER }} @@ -31,7 +31,7 @@ runs: - name: Restore global npm cache folder id: npm-global-cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.yarn-config.outputs.NPM_GLOBAL_CACHE_FOLDER }} key: npm-global-cache-default-${{ runner.os }}-${{ steps.yarn-config.outputs.CURRENT_NODE_VERSION }}-${{ hashFiles(yarn.lock, .yarnrc.yml) }}