From 411362e7e46e5ed715e7f1869e12e7d1b78b4455 Mon Sep 17 00:00:00 2001 From: Matt Loberg Date: Fri, 23 Jul 2021 07:59:56 -0500 Subject: [PATCH 1/2] feat: add input to set version of markdownlint-cli fix #4 --- README.md | 4 +++- action.yml | 3 +++ entrypoint.sh | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) 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..aaf94b8 100644 --- a/action.yml +++ b/action.yml @@ -2,6 +2,9 @@ name: markdown-lint author: Articulate Global Inc. 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 From bc56b08794b72b6a21f07ea7a4390f9a7ec50260 Mon Sep 17 00:00:00 2001 From: Matt Loberg Date: Fri, 23 Jul 2021 08:00:32 -0500 Subject: [PATCH 2/2] chore(legal): update company name --- LICENSE | 2 +- action.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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/action.yml b/action.yml index aaf94b8..fd03ff7 100644 --- a/action.yml +++ b/action.yml @@ -1,5 +1,5 @@ name: markdown-lint -author: Articulate Global Inc. +author: Articulate Global, LLC description: Lint your markdown inputs: version: