Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bluetel/json-to-md into master
Browse files Browse the repository at this point in the history
  • Loading branch information
beniusij committed Oct 2, 2020
2 parents 8b493f5 + 0abb932 commit 04e3294
Showing 1 changed file with 46 additions and 5 deletions.
51 changes: 46 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,56 @@
# json-to-md

This actions converts a JSON returned from composer security checker.
This action converts a JSON returned from symfony security checker to a markdown string. This action is intended to be used with [symfonycorp/security-checker-action](https://github.com/marketplace/actions/sensiolabs-security-checker-action) and [peter-evans/create-issue-from-file](https://github.com/marketplace/actions/create-issue-from-file).

## Input

### `json-path`
### `data`

**Required** Path to JSON file containing the data (~/data.json by default)
**Required:** Stringified JSON data

## Output

### md-data
### `md-data`

Final result parsed in markdown
Final result parsed in markdown

## Example

```yml
name: Composer Security Audit

on:
pull:

jobs:
build:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2

- uses: symfonycorp/security-checker-action@v2
id: security-check

- name: Parse JSON to MD
uses: bluetel/json-to-md@v1
id: json-to-md
with:
data: ${{ steps.security-check.outputs.vulns }}

- name: Save markdown to file
shell: bash
run: |
echo "${{ steps.json-to-md.outputs.md-data }}" >> SECURITY.md
- name: Create issue
id: create-issue
uses: peter-evans/create-issue-from-file@v2
with:
title: "Security vulnerabilities found"
content-filepath: SECURITY.md
```
## Contribute
Fork this repository, make changes in your local dev environment, push to your remote and open a pull request pointing to this repository's `master` branch.

0 comments on commit 04e3294

Please sign in to comment.