-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:bluetel/json-to-md into master
- Loading branch information
Showing
1 changed file
with
46 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |