Skip to content

Commit

Permalink
chore: add working-directory input to prepare-install action (#6181)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHenry committed Dec 8, 2022
1 parent bcad11b commit 0167d91
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Expand Up @@ -47,6 +47,7 @@
"autofix",
"autofixers",
"autofixes",
"automations",
"backticks",
"bigint",
"bivariant",
Expand Down
18 changes: 16 additions & 2 deletions .github/actions/prepare-install/action.yml
@@ -1,12 +1,24 @@
name: 'Prepare: Checkout and Install'
description: 'Prepares the repo for a job by checking out and installing dependencies'
# IMPORTANT NOTE TO MAINTAINERS
#
# Changes to this composite action should be carefully considered and reviewed because it is referenced
# and executed by multiple workflows in our private-automations repository.
#
# Ensure that a member of @typescript-eslint/core-team tests changes there before merging.

name: 'Prepare: Install'
description: 'Prepares the repo by installing dependencies'
inputs:
node-version:
description: 'The node version to setup'
required: true
registry-url:
description: 'Define registry-url'
required: false
# NOTE: This is required for our use-case of sharing this action across multiple repos
working-directory:
description: 'Override the working directory to run the installation in'
required: false
default: '.'

# outputs: - no outputs

Expand All @@ -15,6 +27,7 @@ runs:
steps:
- name: echo github.ref
shell: bash
working-directory: ${{ inputs.working-directory }}
run: echo ${{ github.ref }}

- name: Use Node.js ${{ inputs.node-version }}
Expand All @@ -40,6 +53,7 @@ runs:
# if the cache was hit - this will run in <1s
- name: Install dependencies
shell: bash
working-directory: ${{ inputs.working-directory }}
run: |
yarn --ignore-engines --frozen-lockfile --ignore-scripts
yarn check-clean-workspace-after-install
Expand Down

0 comments on commit 0167d91

Please sign in to comment.