From e003b4888e956cc5197e81c9d3dccaa32c23d064 Mon Sep 17 00:00:00 2001 From: fxrc Date: Fri, 4 Aug 2023 22:05:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20action.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 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