diff --git a/.github/workflows/render-docs.yml b/.github/workflows/render-docs.yml index 1be2a9e..2056d14 100644 --- a/.github/workflows/render-docs.yml +++ b/.github/workflows/render-docs.yml @@ -38,6 +38,14 @@ on: description: 'Commit message' default: 'Update documentation' type: string + committer-name: + description: 'Username to use as author of the commit.' + default: 'github-actions[bot]' + type: string + committer-email: + description: 'Email address to use as author of the commit.' + default: '41898282+github-actions[bot]@users.noreply.github.com' + type: string debug: description: 'Enable debugging mode to provide additional output' default: false @@ -107,6 +115,6 @@ jobs: uses: EndBug/add-and-commit@v9 with: add: "${{ inputs.target-path }}" - author_name: "GitHub Action" - author_email: "action@github.com" + author_name: "${{ inputs.committer-name }}" + author_email: "${{ inputs.committer-email }}" message: "${{ inputs.commit-message }}" diff --git a/README.md b/README.md index 1790322..a529afd 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,8 @@ The workflow has a couple of inputs that allows to configure the behaviour: - `fail-on-warnings` The command prints documentation issues such as missing documentation. This option makes the action fail when such issues are found. This allows to achieve 100% documentation coverage. - `commit` Defines whether the rendered markdown files should be committed to the repository automatically. - `commit-message` Defines the commit message to be used when `commit` is set to true. +- `committer-name` Username to use as the author of the commit. Defaults to "github-actions[bot]". +- `committer-email` Email address to use as the author of the commit. Defaults to the email for "github-actions[bot]". - `debug` Enable this option to get additional output from the tool. This allows to debug in case you get unexpected output from the command. ## 🐛 Reporting Issues diff --git a/action.yml b/action.yml index b54aeb7..5a6a335 100644 --- a/action.yml +++ b/action.yml @@ -27,6 +27,12 @@ inputs: commit-message: description: 'Commit message' default: 'Update documentation' + committer-name: + description: 'Username to use as author of the commit.' + default: 'github-actions[bot]' + committer-email: + description: 'Email address to use as author of the commit.' + default: '41898282+github-actions[bot]@users.noreply.github.com' debug: description: 'Enable debugging mode to provide additional output' default: 'false' @@ -85,6 +91,6 @@ runs: uses: EndBug/add-and-commit@v9 with: add: "${{ inputs.target-path }}" - author_name: "GitHub Action" - author_email: "action@github.com" + author_name: "${{ inputs.committer-name }}" + author_email: "${{ inputs.committer-email }}" message: "${{ inputs.commit-message }}"