Skip to content

Commit

Permalink
Give step names for clarity (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
ybiquitous authored Aug 14, 2024
1 parent 7a709f4 commit 00efdb1
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/nvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,24 @@ jobs:
with:
version: 9

- run: node --version
- name: Show pre-installed Node.js version
run: node --version
- uses: actions/checkout@v4
- name: Install Node.js via nvm
shell: bash --login {0}
run: |
nvm install --latest-npm --no-progress
echo "$(dirname $(nvm which node))" >> $GITHUB_PATH
- run: node --version
- name: Show newly installed Node.js version
run: node --version

# Optional: Cache npm dependencies
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
- name: Store npm cache
uses: actions/cache@v4
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
Expand All @@ -40,7 +43,8 @@ jobs:
id: yarn-cache-dir
shell: bash
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
- name: Store yarn cache
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir.outputs.dir }}
Expand All @@ -53,8 +57,9 @@ jobs:
id: pnpm-cache-dir
shell: bash
run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Setup pnpm cache
- name: Setup pnpm cache
uses: actions/cache@v4
id: pnpm-cache
with:
path: ${{ steps.pnpm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
Expand Down

0 comments on commit 00efdb1

Please sign in to comment.