Skip to content

Commit

Permalink
fix(#20): add cache-dependency-path
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Feb 2, 2023
1 parent 36d4b39 commit dc081df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ runs:
echo "PACKAGE_MANAGER=$INPUT_PM" >> $GITHUB_ENV
elif [ $(find "." -name "pnpm-lock.yaml") ]; then
echo "PACKAGE_MANAGER=pnpm" >> $GITHUB_ENV
echo "LOCKFILE=pnpm-lock.yaml" >> $GITHUB_ENV
elif [ $(find "." -name "yarn.lock") ]; then
echo "PACKAGE_MANAGER=yarn" >> $GITHUB_ENV
echo "LOCKFILE=yarn.lock" >> $GITHUB_ENV
elif [ $(find "." -name "package-lock.json") ]; then
echo "PACKAGE_MANAGER=npm" >> $GITHUB_ENV
echo "LOCKFILE=package-lock.json" >> $GITHUB_ENV
else
echo "No lockfile found.
Please specify your preferred \"package-manager\" in the action configuration."
Expand All @@ -50,6 +53,7 @@ runs:
with:
node-version: ${{ inputs.node-version }}
cache: ${{ env.PACKAGE_MANAGER }}
cache-dependency-path: "${{ inputs.path }}/${{ env.LOCKFILE }}"

- name: Install
shell: "bash"
Expand Down

0 comments on commit dc081df

Please sign in to comment.