Skip to main content
github.createOrUpdateRepositoryFile creates a file or replaces an existing file through GitHub’s Contents API.
automations/update-github-file.automation.ts
Provide the repository, path, Base64-encoded contentBase64, and commitMessage. Add the existing blob sha when replacing a file. Optional branch defaults to the default branch; author and committer accept { name, email }. Returns the commit sha and the content path and sha. Requires Contents write permission. This action rejects paths under .github/workflows/. Use github.createOrUpdateWorkflowFile for workflow files so Automate.ax requests GitHub’s additional Workflows write permission only when GitHub requires it.