From 05969b03fa87cbbc6a956a4a01fbd12782622a74 Mon Sep 17 00:00:00 2001 From: Robert Reinhard Date: Wed, 29 May 2024 07:57:13 -0700 Subject: [PATCH 1/2] Use latest install And add an optional cwd input --- install/action.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/install/action.yml b/install/action.yml index 7f0e134..18d1851 100644 --- a/install/action.yml +++ b/install/action.yml @@ -1,28 +1,25 @@ name: Install description: Install Yarn dependencies +inputs: + cwd: + description: 'Directory containing yarn.lock' + default: '.' + runs: using: composite steps: # Checkout the repo - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 # Install node - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version-file: .nvmrc - - # Not using caching from setup-node because I do want to cache the - # node_modules to speed up yarn install. - - uses: actions/cache@v3 - with: - path: | - /home/runner/.cache/Cypress - node_modules - */node_modules - key: ${{ hashFiles('yarn.lock') }} + cache: yarn + cache-dependency-path: ${{ inputs.cwd }}/yarn.lock # Install Yarn deps - shell: bash - run: yarn install --frozen-lockfile + run: yarn install --frozen-lockfile --cwd=${{ inputs.cwd }} From 389204972de2ba55eb5e8b15e15fe57305102660 Mon Sep 17 00:00:00 2001 From: Robert Reinhard Date: Wed, 29 May 2024 08:03:46 -0700 Subject: [PATCH 2/2] Add docs --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 0097e04..a716f39 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,17 @@ # cloak-actions GitHub Actions for Cloak projects + +## Usage + +Add the following to a step: + +``` +jobs: + job_name: + runs-on: ubuntu-latest + steps: + - uses: bkwld/cloak-actions/install@v2 + # The following is optional + with: + cwd: packages/ugc-housekeeper +```