Skip to content

Commit

Permalink
Merge pull request #3 from BKWLD/add-cwd-install-input
Browse files Browse the repository at this point in the history
Add cwd install input
  • Loading branch information
weotch authored May 29, 2024
2 parents 1b7229b + 3892049 commit 9b4a8a2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
```
19 changes: 8 additions & 11 deletions install/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Install
description: Install Yarn dependencies

inputs:
cwd:
description: 'Directory containing yarn.lock'
default: '.'

runs:
using: composite
steps:
Expand All @@ -12,17 +17,9 @@ runs:
- 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@v4
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 }}

0 comments on commit 9b4a8a2

Please sign in to comment.