From ca61b347e7e7df09f3f4b16e1c83fdd4da8e7593 Mon Sep 17 00:00:00 2001 From: Tom - Henry Coursow Date: Thu, 27 Jul 2023 16:32:07 +0200 Subject: [PATCH] =?UTF-8?q?action.yml=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 0000000..3eabef4 --- /dev/null +++ b/action.yml @@ -0,0 +1,24 @@ +name: 'Get & Cache Dependencies' +description: 'Get the Dependencies from the cache for a (npm) Node JS Project or initialize the cache for it' + +runs: + using: 'composite' # Must be 'composite' for a custom composite action + steps: + - uses: actions/setup-go@v3 + with: + go-version: '1.20' + - uses: actions/go-hashfiles@v0.0.1 + id: get-cache-hash + with: + patterns: |- + **/package-lock.json + - name: Cache dependencies + id: cache + uses: actions/cache@v3 + with: + path: node_modules + key: deps-node-modules-${{ steps.get-cache-hash.outputs.hash }} + - name: Install dependencies + if: steps.cache.outputs.cache-hit != 'true' + run: npm ci + shell: bash # compared to workflow ymls... Action ymls require the 'shell' property when a 'run' property was used! \ No newline at end of file