From 7c985caee07f9ff5e916004623017c453f26f0ac Mon Sep 17 00:00:00 2001 From: MCMXC <16797721+mcmxcdev@users.noreply.github.com> Date: Mon, 24 Jul 2023 12:35:52 -0600 Subject: ci: modernize github actions - use ubuntu-22.04 runner instead of ubuntu-20.04 - use pnpm/action-setup instead of handling pnpm install manually - upgrade tj-actions/changed-files from v36 to v37 - define packageManager config option in package.json which is read by pnpm/action-setup --- .github/workflows/builds.yml | 15 +++++++-------- .github/workflows/check-pr.yml | 4 ++-- 2 files changed, 9 insertions(+), 10 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index e87fc8f..fb9b6cd 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -14,28 +14,27 @@ on: workflow_dispatch: inputs: message: - description: "Message for build" + description: 'Message for build' required: true jobs: build: name: Ferdium Recipes Build - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Print latest commit run: echo ${{ github.sha }} - - name: Set env vars - run: echo "PNPM_CACHE=$HOME/.pnpm-store" >> $GITHUB_ENV - name: Checkout code uses: actions/checkout@v3 + - name: Install pnpm + uses: pnpm/action-setup@v2 - name: Use Node.js specified in the '.nvmrc' file uses: actions/setup-node@v3 with: - node-version-file: ".nvmrc" - - name: Install pnpm - run: npm i -gf "pnpm@$(node -p 'require("./package.json").engines.pnpm')" && pnpm -v + node-version-file: '.nvmrc' + cache: 'pnpm' - name: Install node dependencies recursively - uses: nick-fields/retry@v2.8.2 + uses: nick-fields/retry@v2.8.3 with: command: pnpm i timeout_minutes: 15 diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index 5fff282..a9a4d97 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -8,13 +8,13 @@ on: jobs: check: name: Check Recipe Version Bump - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout code uses: actions/checkout@v3 - name: Fetch main branch run: git fetch origin main --depth 1 - - uses: tj-actions/changed-files@v36 + - uses: tj-actions/changed-files@v37 id: changed-files - name: Checking recipe version bump uses: ./.github/workflows/check-recipe-version-bump -- cgit v1.2.3-54-g00ecf