diff --git a/set-git-config/README.md b/set-git-config/README.md index cd10afc..41f0eca 100644 --- a/set-git-config/README.md +++ b/set-git-config/README.md @@ -13,6 +13,7 @@ Sets Git configuration for actions. | `token` |

GitHub token.

| `false` | `${{ github.token }}` | | `username` |

GitHub username for commits.

| `false` | `github-actions` | | `email` |

GitHub email for commits.

| `false` | `github-actions@github.com` | +| `is_fiximus` |

Whether to use the Fiximus bot.

| `false` | `false` | ### Outputs @@ -21,6 +22,7 @@ Sets Git configuration for actions. | `token` |

GitHub token.

| | `username` |

GitHub username for commits.

| | `email` |

GitHub email for commits.

| +| `is_fiximus` |

Whether to use the Fiximus bot.

| ### Runs @@ -48,4 +50,10 @@ This action is a `composite` action. # # Required: false # Default: github-actions@github.com + + is_fiximus: + # Whether to use the Fiximus bot. + # + # Required: false + # Default: false ``` diff --git a/set-git-config/action.yml b/set-git-config/action.yml index 307c48d..7f0289a 100644 --- a/set-git-config/action.yml +++ b/set-git-config/action.yml @@ -19,6 +19,10 @@ inputs: email: description: 'GitHub email for commits.' default: 'github-actions@github.com' + is_fiximus: + description: 'Whether to use the Fiximus bot.' + required: false + default: 'false' outputs: token: @@ -30,6 +34,9 @@ outputs: email: description: 'GitHub email for commits.' value: ${{ steps.bot.outputs.email }} + is_fiximus: + description: 'Whether to use the Fiximus bot.' + value: ${{ steps.bot.outputs.is_fiximus }} runs: using: composite @@ -38,14 +45,13 @@ runs: id: bot shell: bash run: | - if [ -n "${{ secrets.FIXIMUS_TOKEN }}" ]; then - echo "token=${{ secrets.FIXIMUS_TOKEN }}" >> $GITHUB_OUTPUT + echo "token=${{ inputs.token }}" >> $GITHUB_OUTPUT + echo "username=${{ inputs.username }}" >> $GITHUB_OUTPUT + echo "email=${{ inputs.email }}" >> $GITHUB_OUTPUT + + if [ "${{ inputs.is_fiximus }}" != "false" ]; then echo "username=fiximus" >> $GITHUB_OUTPUT echo "email=github-bot@ivuorinen.net" >> $GITHUB_OUTPUT - else - echo "token=${{ inputs.token }}" >> $GITHUB_OUTPUT - echo "username=${{ inputs.username }}" >> $GITHUB_OUTPUT - echo "email=${{ inputs.email }}" >> $GITHUB_OUTPUT fi - name: Configure Git