Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Replace text content and submit content

License

NotificationsYou must be signed in to change notification settings

jaywcjlove/github-action-modify-file-content

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

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

  • content text file content

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.

About

Replace text content and submit content

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp