Skip to content

chore: add working-directory input to prepare-install action #6181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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