Skip to content

Commit

Permalink
Merge pull request #2 from steinbrueckri/add_input_and_output
Browse files Browse the repository at this point in the history
Add input and output
  • Loading branch information
xorima authored Feb 6, 2020
2 parents 1d95938 + 0acd90d commit 4e0894a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@

A Github Action to run mdl on your files

## Usage
## Inputs

### `path`

Path to scan for markdown files within the directory (and nested directories) `mdl`

## Outputs

### `output`

The output from `mdl`

## Usage
```yaml
name: markdownlint

Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: 'MarkdownLint mdl Action'
author: 'Jason Field'
description: 'Run mdl on your markdown files with ease'
inputs:
path:
description: 'Path to scan for markdown files within the directory (and nested directories)'
required: false
default: './'
outputs:
output: # id of output
description: 'stdout from mdl'
runs:
using: 'docker'
image: 'Dockerfile'
Expand Down
8 changes: 7 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
mdl ./
output=$(mdl $INPUT_PATH)
echo ::set-output name=output::"$output"
if [ ! -z "$output" ]
then
echo "FOUND MARKDOWN ISSUS"
exit 255
fi

0 comments on commit 4e0894a

Please sign in to comment.