Files
add-and-commit/action.yml
T
Dan ZiringandGitHub b0ca32735a fix: Remove GH var interpolation in action.yml docstring (#783)
* fix: Remove GH var interpolation in action.yml docstring

* docs: reword to avoid escaping whole sentence
2026-08-19 14:44:55 +00:00

103 lines
4.5 KiB
YAML

name: Add & Commit
description: Automatically commit changes made in your workflow run directly to your repo
inputs:
add:
description: Arguments for the git add command. --pathspec-from-file/--pathspec-file-nul and abbreviations (e.g. --pathspec-fr, --pathspec-fi) are not allowed.
required: false
default: '.'
author_name:
description: The name of the user that will be displayed as the author of the commit
required: false
author_email:
description: The email of the user that will be displayed as the author of the commit
required: false
commit:
description: Additional arguments for the git commit command. -F/--file, abbreviations (e.g. --fi), and short-option clusters containing F (e.g. -aF) are not allowed. --pathspec-from-file/--pathspec-file-nul and abbreviations (e.g. --pathspec-fr, --pathspec-fi) are not allowed.
required: false
committer_name:
description: The name of the custom committer you want to use
required: false
committer_email:
description: The email of the custom committer you want to use
required: false
cwd:
description: The directory where your repository is located (relative to the runner workspace, or an absolute path). You should use actions/checkout first to set it up. In with:, use the github.workspace context (see README) — $GITHUB_WORKSPACE is not expanded.
required: false
default: '.'
default_author:
description: How the action should fill missing author name or email.
required: false
default: 'github_actor'
dry_run:
description: If true, validate and report what would happen without mutating the repo (no add/commit/push/tag/etc.)
required: false
default: 'false'
fetch:
description: Arguments for the git fetch command (if 'false', the action won't fetch the repo)
required: false
default: --tags --force
message:
description: The message for the commit
required: false
new_branch:
description: The name of the branch to create (must pass git check-ref-format --branch; cannot start with '-' or contain whitespace/control characters).
required: false
pathspec_error_handling:
description: The way the action should handle pathspec errors from the add and remove commands.
required: false
default: ignore
pull:
description: Whether to pull from the remote. true runs git pull with no extra args; false or omit skips pull; any other string is passed as git pull arguments. By default, the action does not pull.
required: false
push:
description: Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (more info in the README)
required: false
default: 'true'
push_attempts:
description: Max times to try pushing. If pull is set, re-pulls between failed attempts (more info in the README)
required: false
default: '1'
remove:
description: Arguments for the git rm command. --pathspec-from-file/--pathspec-file-nul and abbreviations (e.g. --pathspec-fr, --pathspec-fi) are not allowed.
required: false
tag:
description: Arguments for the git tag command (the tag name always needs to be the first word not preceded by a hyphen). -F/--file, abbreviations (e.g. --fi), and short-option clusters containing F (e.g. -aF) are not allowed.
required: false
tag_push:
description: Arguments for the git push --tags command (any additional argument will be added after --tags)
required: false
allow_unsafe_git_protocols:
description: 'If true, disables the transport protocol allowlist (https/http/ssh/file/git) and allows scheme:: remote-helper URLs in git argument inputs. Keep false unless you need a custom remote helper and fully trust those inputs.'
required: false
default: 'false'
# Input not required from the user
github_token:
description: The token used to make requests to the GitHub API. It's NOT used to make commits and should not be changed.
required: false
default: ${{ github.token }}
outputs:
committed:
description: Whether the action has created a commit.
commit_long_sha:
description: The complete SHA of the commit that has been created.
commit_sha:
description: The short SHA of the commit that has been created.
pushed:
description: Whether the action has pushed to the remote.
tagged:
description: Whether the action has created a tag.
tag_pushed:
description: Whether the action has pushed a tag.
runs:
using: node24
main: lib/index.js
branding:
icon: git-commit
color: gray-dark