diff --git a/LICENSE b/LICENSE index f804acc..7f4e86b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Articulate Global Inc. +Copyright (c) 2021 Articulate Global, LLC Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 0a9fb93..d89bd54 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ files with the `md` or `markdown` extension. - uses: articulate/actions-markdownlint@v1 ``` -You can set the config file, the files it scans, or files/directories to ignore. +You can set the config file, the files it scans, files/directories to ignore, or +the version of markdownlint-cli to install. ```yaml - uses: articulate/actions-markdownlint@v1 @@ -20,4 +21,5 @@ You can set the config file, the files it scans, or files/directories to ignore. config: markdownlint-config.json files: 'docs/**/*.md' ignore: node_modules + version: 0.28.1 ``` diff --git a/action.yml b/action.yml index 2c03fc4..fd03ff7 100644 --- a/action.yml +++ b/action.yml @@ -1,7 +1,10 @@ name: markdown-lint -author: Articulate Global Inc. +author: Articulate Global, LLC description: Lint your markdown inputs: + version: + description: Version of markdownlint-cli to use + required: false config: description: markdownlint config file required: false diff --git a/entrypoint.sh b/entrypoint.sh index 28d9690..a29e8c8 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,5 +1,10 @@ #!/bin/sh +if [ -n "$INPUT_VERSION" ]; then + echo "::debug::installing markdownlint-cli ${INPUT_VERSION}" + npm install --global --production "markdownlint-cli@${INPUT_VERSION}" +fi + # Copy the matcher to a shared volume with the host; otherwise "add-matcher" # can't find it. if [ "$INPUT_ANNOTATIONS" != "false" ]; then