fix: normalize template file loadup
This commit is contained in:
@@ -8,7 +8,6 @@ You can see an example of the output at my own [simonecorsi/awesome](https://git
|
|||||||
|
|
||||||
<!-- toc -->
|
<!-- toc -->
|
||||||
|
|
||||||
- [Table of Contents](#table-of-contents)
|
|
||||||
- [Documentation](#documentation)
|
- [Documentation](#documentation)
|
||||||
- [Requirements](#requirements)
|
- [Requirements](#requirements)
|
||||||
- [Configuration](#configuration)
|
- [Configuration](#configuration)
|
||||||
@@ -29,11 +28,13 @@ You can see an example of the output at my own [simonecorsi/awesome](https://git
|
|||||||
The service can be configured setting the appropriate environment variables or writing an `.env` file.
|
The service can be configured setting the appropriate environment variables or writing an `.env` file.
|
||||||
|
|
||||||
| Variable | Description | Default |
|
| Variable | Description | Default |
|
||||||
| -------------- | ------------------------------------------- | -------------------------------- |
|
| ----------------- | -------------------------------------------------------------------- | -------------------------------- |
|
||||||
| `api-token` | Personal github api token. | `${{ secrets.API_TOKEN }}` |
|
| `api-token` | Personal github api token. | `${{ secrets.API_TOKEN }}` |
|
||||||
| `github-token` | Action Token | `${{ secrets.GITHUB_TOKEN }}` |
|
| `github-token` | Action Token | `${{ secrets.GITHUB_TOKEN }}` |
|
||||||
| `github-name` | Name used for the commit, default to action | Github Action |
|
| `github-name` | Name used for the commit, default to action | Github Action |
|
||||||
| `github-email` | email used for commit, default to action | actions@users.noreply.github.com |
|
| `github-email` | email used for commit, default to action | actions@users.noreply.github.com |
|
||||||
|
| `template-path` | Custom output template file ([EJS](https://ejs.co/) template engine) | [TEMPLATE.ejs](./TEMPLATE.ejs) |
|
||||||
|
| `output-filename` | Output filename | `README.md` |
|
||||||
|
|
||||||
#### `api-token`
|
#### `api-token`
|
||||||
|
|
||||||
@@ -63,5 +64,4 @@ jobs:
|
|||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
github-email: ${{ secrets.USER_EMAIL }}
|
github-email: ${{ secrets.USER_EMAIL }}
|
||||||
github-name: ${{ github.repository_owner }}
|
github-name: ${{ github.repository_owner }}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
export default `# <%= username %> Awesome List [](https://github.com/sindresorhus/awesome)
|
# <%= username %> Awesome List [](https://github.com/sindresorhus/awesome)
|
||||||
|
|
||||||
> :star: generated with [simonecorsi/mawesome](https://github.com/simonecorsi/mawesome)
|
> :star: generated with [simonecorsi/mawesome](https://github.com/simonecorsi/mawesome)
|
||||||
|
|
||||||
@@ -11,4 +11,3 @@ export default `# <%= username %> Awesome List [ {
|
export async function main() {
|
||||||
// set default template
|
// set default template
|
||||||
let template = MD_TEMPLATE;
|
let template = await readFile(
|
||||||
|
path.resolve(__dirname, './TEMPLATE.md'),
|
||||||
|
'utf8'
|
||||||
|
);
|
||||||
|
|
||||||
// get template if found in the repo
|
// get template if found in the repo
|
||||||
const customTemplatePath = core.getInput('template-path');
|
const customTemplatePath = core.getInput('template-path');
|
||||||
|
Reference in New Issue
Block a user