Skip to content

Commit 018fc8b

Browse files
committed
Make problem matcher available to published action
1 parent 6e8c18c commit 018fc8b

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
!markdownlint-problem-matcher.json
12
!entrypoint.sh

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
FROM node:lts-alpine
22

3-
# hadolint ignore=DL3018
4-
RUN npm install --global --production [email protected] \
5-
&& apk --update --no-cache add curl jq
3+
RUN npm install --global --production --update-notifier=false [email protected]
64

75
COPY entrypoint.sh /entrypoint.sh
6+
COPY markdownlint-problem-matcher.json /markdownlint-problem-matcher.json
87
ENTRYPOINT ["/entrypoint.sh"]

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
```yaml
1313

1414
- name: markdownlint-cli
15-
uses: nosborn/[email protected].0
15+
uses: nosborn/[email protected].1
1616
with:
1717
files: .
1818
config_file: .markdownlint.yaml

entrypoint.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@ MARKDOWNLINT="${MARKDOWNLINT}${INPUT_IGNORE_FILES:+ -i ${INPUT_IGNORE_FILES}}"
66
MARKDOWNLINT="${MARKDOWNLINT}${INPUT_IGNORE_PATH:+ -p ${INPUT_IGNORE_PATH}}"
77
MARKDOWNLINT="${MARKDOWNLINT}${INPUT_RULES:+ -r ${INPUT_RULES}}"
88

9-
echo '::add-matcher::.github/markdownlint-problem-matcher.json'
9+
PROBLEM_MATCHER="$(mktemp -p "${GITHUB_WORKSPACE}")"
10+
trap 'rm -f "${PROBLEM_MATCHER}"' EXIT
11+
cp /markdownlint-problem-matcher.json "${PROBLEM_MATCHER:?}" || exit
12+
echo "::add-matcher::${PROBLEM_MATCHER:?}"
1013

1114
# shellcheck disable=SC2086
1215
${MARKDOWNLINT} ${INPUT_FILES}
File renamed without changes.

0 commit comments

Comments
 (0)