mirror of
https://github.com/ivuorinen/actions.git
synced 2026-02-10 01:45:48 +00:00
fix: switch from secrets to inputs in set-git-config
This commit is contained in:
@@ -13,6 +13,7 @@ Sets Git configuration for actions.
|
|||||||
| `token` | <p>GitHub token.</p> | `false` | `${{ github.token }}` |
|
| `token` | <p>GitHub token.</p> | `false` | `${{ github.token }}` |
|
||||||
| `username` | <p>GitHub username for commits.</p> | `false` | `github-actions` |
|
| `username` | <p>GitHub username for commits.</p> | `false` | `github-actions` |
|
||||||
| `email` | <p>GitHub email for commits.</p> | `false` | `github-actions@github.com` |
|
| `email` | <p>GitHub email for commits.</p> | `false` | `github-actions@github.com` |
|
||||||
|
| `is_fiximus` | <p>Whether to use the Fiximus bot.</p> | `false` | `false` |
|
||||||
|
|
||||||
### Outputs
|
### Outputs
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ Sets Git configuration for actions.
|
|||||||
| `token` | <p>GitHub token.</p> |
|
| `token` | <p>GitHub token.</p> |
|
||||||
| `username` | <p>GitHub username for commits.</p> |
|
| `username` | <p>GitHub username for commits.</p> |
|
||||||
| `email` | <p>GitHub email for commits.</p> |
|
| `email` | <p>GitHub email for commits.</p> |
|
||||||
|
| `is_fiximus` | <p>Whether to use the Fiximus bot.</p> |
|
||||||
|
|
||||||
### Runs
|
### Runs
|
||||||
|
|
||||||
@@ -48,4 +50,10 @@ This action is a `composite` action.
|
|||||||
#
|
#
|
||||||
# Required: false
|
# Required: false
|
||||||
# Default: github-actions@github.com
|
# Default: github-actions@github.com
|
||||||
|
|
||||||
|
is_fiximus:
|
||||||
|
# Whether to use the Fiximus bot.
|
||||||
|
#
|
||||||
|
# Required: false
|
||||||
|
# Default: false
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ inputs:
|
|||||||
email:
|
email:
|
||||||
description: 'GitHub email for commits.'
|
description: 'GitHub email for commits.'
|
||||||
default: 'github-actions@github.com'
|
default: 'github-actions@github.com'
|
||||||
|
is_fiximus:
|
||||||
|
description: 'Whether to use the Fiximus bot.'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
token:
|
token:
|
||||||
@@ -30,6 +34,9 @@ outputs:
|
|||||||
email:
|
email:
|
||||||
description: 'GitHub email for commits.'
|
description: 'GitHub email for commits.'
|
||||||
value: ${{ steps.bot.outputs.email }}
|
value: ${{ steps.bot.outputs.email }}
|
||||||
|
is_fiximus:
|
||||||
|
description: 'Whether to use the Fiximus bot.'
|
||||||
|
value: ${{ steps.bot.outputs.is_fiximus }}
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
@@ -38,14 +45,13 @@ runs:
|
|||||||
id: bot
|
id: bot
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ -n "${{ secrets.FIXIMUS_TOKEN }}" ]; then
|
echo "token=${{ inputs.token }}" >> $GITHUB_OUTPUT
|
||||||
echo "token=${{ secrets.FIXIMUS_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 "username=fiximus" >> $GITHUB_OUTPUT
|
||||||
echo "email=github-bot@ivuorinen.net" >> $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
|
fi
|
||||||
|
|
||||||
- name: Configure Git
|
- name: Configure Git
|
||||||
|
|||||||
Reference in New Issue
Block a user