https://github.com/spacelift-io/update-file-action
Create/Update/Delete a file in a repository other than the current one.
https://github.com/spacelift-io/update-file-action
Last synced: about 2 months ago
JSON representation
Create/Update/Delete a file in a repository other than the current one.
- Host: GitHub
- URL: https://github.com/spacelift-io/update-file-action
- Owner: spacelift-io
- License: mit
- Created: 2021-03-18T15:37:28.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-28T09:29:57.000Z (over 2 years ago)
- Last Synced: 2025-04-05T22:11:33.381Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 600 KB
- Stars: 0
- Watchers: 13
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Update File Action
This Action lets you Create/Update/Delete a file in a repository other than the one running the Action.
## Inputs
### `github-token`
**Required** GitHub Token to use to access the target repository.
### `owner`
**Required** Owner of the target repository.
### `repository`
**Required** Target repository name.
### `target-file-path`
**Required** Path of file in the repository to create/update/delete.
### `commit-message`
**Required** The commit message to use. Default `"Automated workflow commit."`.
### `content`
**Required** If creating/updating, the content for the file. Default `""`.
### `delete`
**Required** If the file should be deleted, instead of created/updated. Default `"false"`.
## Example usage
```yaml
uses: spacelift-io/[email protected]
with:
github-token: ${{ secrets.GH_TOKEN }}
owner: spacelift-io
repository: update-file-action
target-file-path: 'test/main2.md'
content: |
Amazing
Great
Content
```