mirror of
https://github.com/wagoid/commitlint-github-action.git
synced 2025-11-07 08:06:54 +00:00
ci: run npm ci to install and ignore scripts (#104)
* ci: run `npm ci` to install and ignore scripts `npm ci` is meant to be used in CI environments and the scripts are ignored to prevent e.g. Husky from being installed in the CI environment. See https://docs.npmjs.com/cli/v7/commands/npm-ci. * ci: run `npm ci` to install and ignore scripts in the Dockerfile
This commit is contained in:
parent
a0b2acf16c
commit
e03ee8edd2
3 changed files with 5 additions and 5 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
|
@ -18,7 +18,7 @@ jobs:
|
|||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- run: npm install
|
||||
- run: npm ci --ignore-scripts
|
||||
- run: npm run lint
|
||||
- run: npm test -- --ci --coverage
|
||||
release:
|
||||
|
|
@ -42,7 +42,7 @@ jobs:
|
|||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- run: npm install
|
||||
- run: npm ci --ignore-scripts
|
||||
- name: Configure git user
|
||||
run: |
|
||||
git config user.email 'github-action@users.noreply.github.com'
|
||||
|
|
|
|||
4
.github/workflows/commitlint.yml
vendored
4
.github/workflows/commitlint.yml
vendored
|
|
@ -21,7 +21,7 @@ jobs:
|
|||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- run: npm install
|
||||
- run: npm ci --ignore-scripts
|
||||
- uses: ./
|
||||
id: run_commitlint
|
||||
env:
|
||||
|
|
@ -46,7 +46,7 @@ jobs:
|
|||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
- run: npm install
|
||||
- run: npm ci --ignore-scripts
|
||||
- uses: ./
|
||||
env:
|
||||
NODE_PATH: ${{ github.workspace }}/node_modules
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ RUN apk --no-cache add git
|
|||
|
||||
COPY package*.json /
|
||||
|
||||
RUN npm ci --production
|
||||
RUN npm ci --production --ignore-scripts
|
||||
|
||||
COPY . .
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue