Modify File Content
ActionsReplace text content and submit content
Here is the example: update time 2024-06-25 15:56:51
Here is the different delimiter example: different GAMFC_TABEL
& GAMFC_TABEL-END
(test)
token
YourGITHUB_TOKEN
. This is required. Why do we needtoken
? Read more here: About the GITHUB_TOKEN secret. Default:${{ github.token }}
body
what needs to be replacedpath
file to be replacedbranch
The branch where the files are committed. Default:${{ github.ref_name }}
ref
The name of the commit/branch/tag. Default: the repository’s default branch (usuallymaster
)overwrite
Overwrite the entire file content, by defaultfalse
sync_local_file
Sync local file content, by defaulttrue
message
The commit message. by defaultdoc: update <file path>.
committer_name
The name of the author or committer of the commit. by defaultgithub-actions[bot]
committer_email
The email of the author or committer of the commit. by defaultgithub-actions[bot]@users.noreply.github.com
openDelimiter
Character to use for opening delimiter, by default "<!--GAMFC-->"closeDelimiter
Character to use for closing delimiter, by default "<!--GAMFC-END-->"
content
text file content
- name: Modify README.md
uses: jaywcjlove/github-action-modify-file-content@main
with:
path: README.md
README.md
file content
update time <!--GAMFC-->2024-06-25 15:56:51<!--GAMFC-END-->
Replace the content between <!--GAMFC-->2024-06-25 15:56:51<!--GAMFC-END-->
.
- name: Modify README.md
uses: jaywcjlove/github-action-modify-file-content@main
with:
path: README.md
body: "{{date:YYYY-MM-DD HH:mm:ss}}"
- name: Modify README.md
uses: jaywcjlove/github-action-modify-file-content@main
with:
path: README.md
body: "overwrite file content {{date:YYYY-MM-DD HH:mm:ss}}",
overwrite: 'true'
- name: Modify test test/overwrite.file.md
uses: jaywcjlove/github-action-modify-file-content@main
with:
branch: test
path: test/overwrite.file.md
body: "{{date:YYYY-MM-DD HH:mm:ss}}"
overwrite: 'true'
- Github Release Changelog Generator A GitHub Action that compares the commit differences between two branches
- Create Tags From Auto create tags from commit or package.json.
- Github Action Contributors Github action generates dynamic image URL for contributor list to display it!
- Generated Badges Create a badge using GitHub Actions and GitHub Workflow CPU time (no 3rd parties servers)
- Create Coverage Badges Create coverage badges from coverage reports. (no 3rd parties servers)
- Github Action package Read and modify the contents of
package.json
. - Github Action EJS A github action to render a ejs template using github context.
- Github Action Read File Content Read file contents. You can also get the file content in the branch.
Licensed under the MIT License.
Modify File Content is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.