Skip to content
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

Feat - Add should-lint-lockfile input to control the linting of the lockfile #2

Merged
merged 2 commits into from
Mar 4, 2024
Merged
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
9 changes: 8 additions & 1 deletion .github/workflows/js--emberjs-addons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ on:
required: false
type: string

should-lint-lockfile:
description: If the job to lint lockfile should run or not.
default: true
required: false
type: boolean

jobs:
lint-tests:
name: Lint and tests
Expand All @@ -50,6 +56,7 @@ jobs:

# https://github.com/lirantal/lockfile-lint
- name: Lint lockfile
if: ${{ inputs.should-lint-lockfile }}
run: |
if [ "${{ inputs.package-manager }}" = "npm" ]; then
npx lockfile-lint --path package-lock.json --allowed-hosts npm yarn --validate-https
Expand Down Expand Up @@ -101,7 +108,7 @@ jobs:
elif [ "${{ inputs.package-manager }}" = "yarn" ]; then
yarn install --no-lockfile --non-interactive
elif [ "${{ inputs.package-manager }}" = "pnpm" ]; then
pnpm install --no-lockfile
pnpm install --no-lockfile
else
echo "Unsupported package manager: ${{ inputs.package-manager }}"
exit 1
Expand Down