commit e003b4888e956cc5197e81c9d3dccaa32c23d064 Author: fxrc Date: Fri Aug 4 22:05:56 2023 +0800 添加 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..d90eff1 --- /dev/null +++ b/action.yml @@ -0,0 +1,26 @@ +name: 'Yarn install' +description: 'Run yarn install with cache enabled' + +runs: + using: 'composite' + + steps: + - run: corepack enable + + - uses: seepine/hash-files@v1 + id: get-hash + with: + patterns: | + **/package.json + **/yarn.lock + + - uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-yarn-${{ steps.get-hash.outputs.hash }} + + - run: echo install start + + - run: yarn install + + - run: echo install end