Creates a new file or updates an existing file in a GitHub repository; SHA can be provided to validate file updates, automatically fetched if not provided.
The blob SHA of the file being replaced. Automatically fetched if not provided. If a 409 conflict occurs (SHA mismatch due to concurrent modifications), the action will automatically retry up to 5 times with exponential backoff and jitter.
pathstring
Required
The full path to the file in the repository, including the filename and extension. Do not include leading slashes.
repostring
Required
The name of the repository (not case sensitive, without the `.git` extension).
ownerstring
Required
The account owner of the repository (not case sensitive).
branchstring
The branch name. Defaults to the repository's default branch if omitted. If a non-existent branch is specified, the action will automatically fall back to the repository's default branch. For empty repositories, omitting this parameter is recommended to let GitHub initialize wit…
contentstring
Required
The new file content. Can be provided as plain text (will be automatically encoded to Base64) or as Base64-encoded text. GitHub API requires Base64 encoding, which this action handles automatically.
messagestring
Required
The commit message for this file creation or update.
author__datestring
Author's timestamp (ISO 8601 format). Defaults to committer's date if author details are provided but date is not.
author__namestring
Author's name. If specified, `author_email` is also required. Defaults to committer details; if all committer/author details omitted, GitHub uses authenticated user.
author__emailstring
Author's email. If specified, `author_name` is also required. Defaults to committer details; if all committer/author details omitted, GitHub uses authenticated user.
committer__datestring
Committer's commit timestamp (ISO 8601 format). Defaults to current time if committer details are provided but date is not.
committer__namestring
Committer's name. If specified, `committer_email` is also required. GitHub uses authenticated user if all committer/author details omitted.
Observable output
data
Required
Data from the action execution
errorstring
Error if any occurred during the execution of the action
successfulboolean
Required
Whether or not the action execution was successful or not