action-demo/.gitea/workflows/cache-npx.yml

28 lines
587 B
YAML
Raw Normal View History

2024-07-30 10:35:31 +08:00
name: Cache Npx
on: [push]
2024-08-17 17:22:11 +08:00
env:
DOCKER_REGISTRY: git.zgfxrc.cn
DOCKER_USERNAME: huanghs
2024-07-30 10:35:31 +08:00
jobs:
task:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
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-10-10 10:48:30 +08:00
key: ${{ runner.os }}-npx-2
2024-07-30 10:35:31 +08:00
2024-07-30 14:39:22 +08:00
- run: npx cloc .
2024-08-17 17:22:11 +08:00