maxgfr/GitHub Commit Push File

Github action which lets you to commit and push a file to a repository.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Mar 30, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: maxgfr/github-commit-push-file@e0a252df0f091b46232980b3c1845a53913e76cb # v0.4.1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
commit_messageThe commit message (required unless commits is provided). Supports template variables: {{date}}, {{datetime}}, {{sha}}, {{sha:short}}, {{branch}}, {{run_id}}, {{run_number}}, {{actor}}, {{repository}}. no
commit_bodyOptional commit body (appended after commit message with a blank line). Supports template variables.no""
filesFiles to add (space-separated, supports quoted paths and glob patterns). Defaults to all files (-A)no-A
branchTarget branch to push to. Defaults to the current branchno""
author_nameThe name of the commit author. Defaults to GITHUB_ACTORno""
author_emailThe email of the commit author. Defaults to GITHUB_ACTOR@users.noreply.github.comno""
sign_commitWhether to sign the commit with GPG (requires GPG key setup)nofalse
gpg_private_keyGPG private key (base64 encoded) for signing commitsno""
gpg_passphrasePassphrase for the GPG private keyno""
force_pushWhether to force pushnotrue
skip_if_no_changesSkip commit and push if there are no changesnotrue
skip_hooksWhether to skip git hooks (--no-verify) on commitnotrue
work_dirWorking directory to execute git commands in. Defaults to the repository rootno
dry_runShow what would be committed without actually committing or pushingnofalse
tagOptional tag to create on the commitno""
tag_messageMessage for annotated tag (if empty, creates a lightweight tag)no""
create_branchCreate the target branch if it does not exist on the remotenofalse
create_prWhether to create a pull request after pushing (requires token)nofalse
pr_titleTitle for the pull request (defaults to commit message). Supports template variables.no""
pr_base_branchBase branch for the pull request (defaults to the repository default branch)no""
pr_bodyBody for the pull request. Supports template variables.no""
pr_labelsComma-separated list of labels to add to the pull requestno""
pr_draftWhether to create the pull request as a draftnofalse
tokenGitHub token for authentication (used for push auth and PR creation)no""
commitsJSON array of commits to make [{message, files, body?}]. Each commit must declare its own files. Overrides commit_message/files if provided. Supports template variables.no""
amendAmend the last commit instead of creating a new one (cannot be used with commits array)nofalse
retry_on_conflictRetry push with pull --rebase if it fails due to remote changes (only when force_push is false)nofalse
max_retriesNumber of push retries after the initial attempt fails, when retry_on_conflict is enabled (total attempts = max_retries + 1)no3
exclude_filesFiles/patterns to exclude from staging (space-separated, supports quoted paths). Applied after git add.no""
pathspec_from_filePath to a file containing the list of files to add (one per line). Takes precedence over files input.no""
commit_timestampOverride commit date (sets GIT_AUTHOR_DATE and GIT_COMMITTER_DATE). Accepts any git-compatible date format.no""
commit_name[DEPRECATED] Use commit_message insteadno""
namedescription
committedWhether a commit was made (true/false)
commit_shaThe SHA of the last commit (if committed)
commit_shasJSON array of all commit SHAs
commit_urlThe GitHub URL of the last commit
changed_filesJSON array of files changed across all commits
pr_urlThe URL of the created pull request (if create_pr was used)
pr_numberThe number of the created pull request (if create_pr was used)