-
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.
- Loading branch information
0 parents
commit e48a890
Showing
15 changed files
with
8,456 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Test | ||
|
||
on: push | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: ./ | ||
id: convert_to_html | ||
with: | ||
product-name: 'Test Product' | ||
vpat-location: 'test/vpats' | ||
|
||
- run: echo -e ${{ steps.convert_to_html.outputs.stringified-html }} > vpat.html | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: result | ||
path: vpat.html |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/.DS_Store | ||
node_modules/ |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn build |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# action-vpat-to-html | ||
|
||
*GitHub Action that converts a VPAT report from markdown to styled HTML* | ||
|
||
## Example workflow | ||
|
||
```yaml | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'vpats/*' | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout my product repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Convert most recent VPAT to HTML | ||
uses: dequelabs/action-vpat-to-html@main | ||
id: convert_to_html | ||
with: | ||
product-name: 'My Product' | ||
vpat-location: vpats | ||
|
||
- name: Write HTML to file | ||
run: echo -e ${{ steps.convert_to_html.outputs.stringified-html }} > vpat.html | ||
``` | ||
## Inputs | ||
| Name | Description | Default | | ||
| --- | --- | --- | | ||
`product-name` | A human-readable product name. This is used to generate a title for the resulting HTML document. | | ||
`vpat-location` | The directory from which the most recent VPAT can be sourced. VPATs must be in markdown format. | `vpats` | ||
|
||
## Outputs | ||
|
||
| Name | Description | | ||
| --- | --- | | ||
| `stringified-html` | The generated HTML as a string. This value contains escape characters (e.g., `\n`). | | ||
|
||
## Developer notes | ||
|
||
* The compiled `dist/` directory is committed to the `main` branch by running `npm run build` locally and committing the changes. The pre-commit hook should do this for you. | ||
* The `Test` workflow is triggered by every `push` event. Navigate to the workflow run page and open the `result` artifact to view the generated HTML. |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: VPAT to HTML | ||
description: Convert a markdown VPAT report to HTML | ||
author: Deque Systems, Inc. | ||
|
||
inputs: | ||
product-name: | ||
description: Human-readable product name | ||
required: true | ||
vpat-location: | ||
description: Path to directory containing VPATs | ||
default: vpats | ||
|
||
outputs: | ||
stringified-html: | ||
description: Stringified HTML content of VPAT report | ||
|
||
runs: | ||
using: "node16" | ||
main: "dist/index.js" |
Oops, something went wrong.