Actions56
- Repository Actions
- Issue Actions
- Pull Request Actions
- Organization Actions
- User Actions
- Comment Actions
- Label Actions
- Milestone Actions
- Release Actions
- Branch Actions
- File Actions
File → Update
AI-generatedSummary
Update a file's content in a specified repository on Codeberg by providing the current file SHA to avoid conflicts and a commit message describing the change.
Inputs
- Authentication — Method of authentication, either Access Token or OAuth2.
- Repository Owner (required) — Owner of the repository where the file resides.
- Repository Name (required) — Name of the repository.
- File Path (required) — Path of the file to update (e.g., docs/README.md).
- Content (required) — New plain text content for the file; it will be automatically base64-encoded.
- SHA (required) — Current SHA of the file to prevent update conflicts.
- Commit Message (required) — Commit message describing the update.
- Branch — Branch to commit the changes to. Optional.
- New Branch — Create a new branch from a specified branch and commit to it. Optional.
Output shape
a single record
Returns the API response of the updated file's metadata and details as JSON. The response structure follows Codeberg's API file update format.