Skip to content

Commit 4b1ea35

Browse files
committed
Reproducible npm build
1 parent 9ed1a59 commit 4b1ea35

9 files changed

Lines changed: 624 additions & 3 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock.json linguist-generated=true

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@ updates:
1111
directory: /
1212
schedule:
1313
interval: daily
14+
15+
- package-ecosystem: npm
16+
directory: /
17+
schedule:
18+
interval: daily
19+
versioning-strategy: lockfile-only

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
.envrc
2+
node_modules/

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ repos:
2121
- id: pretty-format-json
2222
args:
2323
- --autofix
24+
exclude: package-lock.json
2425
- id: trailing-whitespace
2526
exclude: examples/ignore/example-ignore.md
2627

@@ -37,4 +38,12 @@ repos:
3738
hooks:
3839
- id: actionlint-docker
3940

41+
- repo: local
42+
hooks:
43+
- id: package-lock
44+
name: package.json and package-lock.json are in step
45+
entry: npm ci --omit=dev --silent
46+
language: system
47+
pass_filenames: false
48+
4049
minimum_pre_commit_version: !!str 4.2

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM node:lts-alpine@sha256:41e4389f3d988d2ed55392df4db1420ad048ae53324a8e2b7c6d19508288107e
22

3-
RUN npm install --global --omit=dev --update-notifier=false markdownlint-cli@0.43.0
3+
COPY package.json package-lock.json /
4+
RUN npm ci --omit=dev
45

56
COPY entrypoint.sh /entrypoint.sh
67
COPY markdownlint-problem-matcher.json /markdownlint-problem-matcher.json

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Basic usage with all options enabled:
1212

1313
```yaml
1414
- name: markdownlint-cli
15-
uses: nosborn/github-action-markdown-cli@v3.3.0
15+
uses: nosborn/github-action-markdown-cli@v3.4.0
1616
with:
1717
files: .
1818
config_file: .markdownlint.yaml

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cp /markdownlint-problem-matcher.json "${PROBLEM_MATCHER:?}" || exit
1313
echo "::add-matcher::${PROBLEM_MATCHER:?}"
1414

1515
# shellcheck disable=SC2086
16-
${MARKDOWNLINT} ${INPUT_FILES:?}
16+
npx ${MARKDOWNLINT} ${INPUT_FILES:?}
1717
readonly RC=$?
1818

1919
echo '::remove-matcher owner=markdownlint::'

0 commit comments

Comments
 (0)