diff options
author | 2023-07-24 12:35:52 -0600 | |
---|---|---|
committer | 2023-07-26 17:41:34 +0000 | |
commit | 7c985caee07f9ff5e916004623017c453f26f0ac (patch) | |
tree | bb9c2b712ddb0bbac1fa6fca222433a3ec97d9fc /.github/workflows/builds.yml | |
parent | Improve lint setup (#400) (diff) | |
download | ferdium-recipes-7c985caee07f9ff5e916004623017c453f26f0ac.tar.gz ferdium-recipes-7c985caee07f9ff5e916004623017c453f26f0ac.tar.zst ferdium-recipes-7c985caee07f9ff5e916004623017c453f26f0ac.zip |
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
Diffstat (limited to '.github/workflows/builds.yml')
-rw-r--r-- | .github/workflows/builds.yml | 15 |
1 files changed, 7 insertions, 8 deletions
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: | |||
14 | workflow_dispatch: | 14 | workflow_dispatch: |
15 | inputs: | 15 | inputs: |
16 | message: | 16 | message: |
17 | description: "Message for build" | 17 | description: 'Message for build' |
18 | required: true | 18 | required: true |
19 | 19 | ||
20 | jobs: | 20 | jobs: |
21 | build: | 21 | build: |
22 | name: Ferdium Recipes Build | 22 | name: Ferdium Recipes Build |
23 | runs-on: ubuntu-20.04 | 23 | runs-on: ubuntu-22.04 |
24 | steps: | 24 | steps: |
25 | - name: Print latest commit | 25 | - name: Print latest commit |
26 | run: echo ${{ github.sha }} | 26 | run: echo ${{ github.sha }} |
27 | - name: Set env vars | ||
28 | run: echo "PNPM_CACHE=$HOME/.pnpm-store" >> $GITHUB_ENV | ||
29 | - name: Checkout code | 27 | - name: Checkout code |
30 | uses: actions/checkout@v3 | 28 | uses: actions/checkout@v3 |
29 | - name: Install pnpm | ||
30 | uses: pnpm/action-setup@v2 | ||
31 | - name: Use Node.js specified in the '.nvmrc' file | 31 | - name: Use Node.js specified in the '.nvmrc' file |
32 | uses: actions/setup-node@v3 | 32 | uses: actions/setup-node@v3 |
33 | with: | 33 | with: |
34 | node-version-file: ".nvmrc" | 34 | node-version-file: '.nvmrc' |
35 | - name: Install pnpm | 35 | cache: 'pnpm' |
36 | run: npm i -gf "pnpm@$(node -p 'require("./package.json").engines.pnpm')" && pnpm -v | ||
37 | - name: Install node dependencies recursively | 36 | - name: Install node dependencies recursively |
38 | uses: nick-fields/retry@v2.8.2 | 37 | uses: nick-fields/retry@v2.8.3 |
39 | with: | 38 | with: |
40 | command: pnpm i | 39 | command: pnpm i |
41 | timeout_minutes: 15 | 40 | timeout_minutes: 15 |