2024-07-30 10:35:31 +08:00
|
|
|
name: Cache Npx
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
|
|
task:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
2024-07-30 11:48:38 +08:00
|
|
|
|
|
|
|
- run: npm config get cache
|
|
|
|
|
2024-07-30 11:50:47 +08:00
|
|
|
- run: echo ~
|
|
|
|
|
2024-07-30 11:48:38 +08:00
|
|
|
- run: pwd
|
2024-07-30 10:35:31 +08:00
|
|
|
|
2024-07-30 14:52:55 +08:00
|
|
|
- name: Get npm cache dir
|
|
|
|
id: npm-cache-dir
|
|
|
|
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
|
|
|
|
|
|
|
|
- run: echo "${{ steps.npm-cache-dir.outputs.dir }}"
|
|
|
|
|
|
|
|
- name: Cache npx
|
2024-07-30 10:35:31 +08:00
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
2024-07-30 14:52:55 +08:00
|
|
|
path: ${{ steps.npm-cache-dir.outputs.dir }}/_npx
|
2024-07-30 10:35:31 +08:00
|
|
|
key: ${{ runner.os }}-npx
|
|
|
|
|
2024-07-30 14:39:22 +08:00
|
|
|
- run: npx cloc .
|