Movatterモバイル変換


[0]ホーム

URL:


top
Modify File Content<sup>2.0.4</sup> logoModify File Content2.0.4

Modify File Content

Buy me a coffeetest

Replace text content and submit content

Here is the example: update time 2025-05-12 17:15:59

Here is the different delimiter example: differentGAMFC_TABEL &GAMFC_TABEL-END (test)

Inputs

NameRequiredDefaultDescription
token${{ github.token }}GitHub Token used to authenticate API requests.Why?
bodyThe content to insert between delimiters in the target file.
trim_whitespacetrueTrim leading and trailing whitespace inbody.
pathFile path to be modified.
branch${{ github.ref_name }}Branch to commit changes to.
refDefault branch (usuallymaster)The target commit, branch, or tag.
overwritefalseWhether to overwrite the entire file.
sync_local_filetrueWhether to sync the file from the local content.
messagedoc: update <file path>.Commit message.
committer_namegithub-actions[bot]Name used for the Git commit author.
committer_emailgithub-actions[bot]@users.noreply.github.comEmail used for the Git commit author.
openDelimiter<!--GAMFC-->2025-05-12 17:15:59<!--GAMFC-END-->End delimiter for content replacement.

Outputs

Example Usage

-name: Modify README.mduses: jaywcjlove/github-action-modify-file-content@mainwith:path: README.md

README.md file content

update time<!--GAMFC-->2025-05-12 17:15:59<!--GAMFC-END-->

Replace the content between<!--GAMFC-->2025-05-12 17:15:59<!--GAMFC-END-->.

format date

-name: Modify README.mduses: jaywcjlove/github-action-modify-file-content@mainwith:path: README.mdbody:"{{date:YYYY-MM-DD HH:mm:ss}}"

overwrite file

-name: Modify README.mduses: jaywcjlove/github-action-modify-file-content@mainwith:path: README.mdbody:"overwrite file content {{date:YYYY-MM-DD HH:mm:ss}}",overwrite:'true'

specify branch changes

-name: Modify test test/overwrite.file.mduses: jaywcjlove/github-action-modify-file-content@mainwith:branch: testpath: test/overwrite.file.mdbody:"{{date:YYYY-MM-DD HH:mm:ss}}"overwrite:'true'

See Also

Contributors

As always, thanks to our amazing contributors!

小弟调调

License

Licensed under the MIT License.

SponsorCreate TagContributorsRead File ContentGenerated Badges
Released under the MIT License. Copyright © 2025 Kenny Wong
Generated byidoc v1.34.1

[8]ページ先頭

©2009-2025 Movatter.jp