mirror of
https://github.com/stefanzweifel/git-auto-commit-action.git
synced 2025-04-21 17:39:43 +08:00
Rename Input and add output
This commit is contained in:
parent
11a6e5f38f
commit
4f8f3ad16e
@ -58,10 +58,6 @@ The following is an extended example with all available options.
|
||||
```yaml
|
||||
- uses: stefanzweifel/git-auto-commit-action@v5
|
||||
with:
|
||||
# Perform a clean git tag and push, without commiting anything
|
||||
# Default to false
|
||||
git_tag_only: false
|
||||
|
||||
# Optional. Commit message for the created commit.
|
||||
# Defaults to "Apply automatic changes"
|
||||
commit_message: Automated Change
|
||||
@ -122,6 +118,10 @@ The following is an extended example with all available options.
|
||||
|
||||
# Optional. Create given branch name in local and remote repository.
|
||||
create_branch: true
|
||||
|
||||
# Perform a clean git tag and push, without commiting anything
|
||||
# Default to false
|
||||
create_git_tag_only: false
|
||||
```
|
||||
|
||||
Please note that the Action depends on `bash`. If you're using the Action in a job in combination with a custom Docker container, make sure that `bash` is installed.
|
||||
|
10
action.yml
10
action.yml
@ -4,10 +4,6 @@ description: 'Automatically commits files which have been changed during the wor
|
||||
author: Stefan Zweifel <stefan@stefanzweifel.dev>
|
||||
|
||||
inputs:
|
||||
git_tag_only:
|
||||
description: Perform a clean git tag and push, without commiting anything
|
||||
required: false
|
||||
default: false
|
||||
commit_message:
|
||||
description: Commit message
|
||||
required: false
|
||||
@ -74,6 +70,10 @@ inputs:
|
||||
create_branch:
|
||||
description: Create new branch with the name of `branch`-input in local and remote repository, if it doesn't exist yet.
|
||||
default: false
|
||||
create_git_tag_only:
|
||||
description: Perform a clean git tag and push, without commiting anything
|
||||
required: false
|
||||
default: false
|
||||
internal_git_binary:
|
||||
description: Internal use only! Path to git binary used to check if git is available. (Don't change this!)
|
||||
default: git
|
||||
@ -83,6 +83,8 @@ outputs:
|
||||
description: Value is "true", if the repository was dirty and file changes have been detected. Value is "false", if no changes have been detected.
|
||||
commit_hash:
|
||||
description: Full hash of the created commit. Only present if the "changes_detected" output is "true".
|
||||
create_git_tag_only:
|
||||
description:
|
||||
|
||||
runs:
|
||||
using: 'node20'
|
||||
|
@ -30,9 +30,9 @@ _main() {
|
||||
_check_if_git_is_available
|
||||
|
||||
_switch_to_repository
|
||||
if "$INPUT_GIT_TAG_ONLY"; then
|
||||
_log "debug" "git tag only.";
|
||||
_set_github_output "git_tag_only" "true"
|
||||
if "$INPUT_CREATE_GIT_TAG_ONLY"; then
|
||||
_log "debug" "Create git tag only";
|
||||
_set_github_output "create_git_tag_only" "true"
|
||||
_tag_commit
|
||||
_push_to_github
|
||||
elif _git_is_dirty || "$INPUT_SKIP_DIRTY_CHECK"; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user