{"id":24672335,"url":"https://github.com/alexrogalskiy/github-action-tag-replacer","last_synced_at":"2025-10-08T07:30:50.310Z","repository":{"id":37023285,"uuid":"349793843","full_name":"AlexRogalskiy/github-action-tag-replacer","owner":"AlexRogalskiy","description":"🏷️ GitHub action to replace placeholders in files","archived":false,"fork":false,"pushed_at":"2025-01-24T07:32:17.000Z","size":941,"stargazers_count":2,"open_issues_count":317,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-24T08:26:25.632Z","etag":null,"topics":["github-actions","replace-text"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/tag-replacer","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlexRogalskiy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":".github/SECURITY.md","support":".github/support.yml","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"open_collective":"nullables","patreon":"AlexRogalskiy","ko_fi":"alexrogalskiy","issuehunt":"AlexRogalskiy","custom":["https://www.nullables.io/"]}},"created_at":"2021-03-20T17:35:49.000Z","updated_at":"2023-03-17T01:24:02.000Z","dependencies_parsed_at":"2024-02-08T03:31:30.828Z","dependency_job_id":"3d70c894-133a-45b6-b06e-9e69c1761235","html_url":"https://github.com/AlexRogalskiy/github-action-tag-replacer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexRogalskiy%2Fgithub-action-tag-replacer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexRogalskiy%2Fgithub-action-tag-replacer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexRogalskiy%2Fgithub-action-tag-replacer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexRogalskiy%2Fgithub-action-tag-replacer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexRogalskiy","download_url":"https://codeload.github.com/AlexRogalskiy/github-action-tag-replacer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235688610,"owners_count":19029915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-actions","replace-text"],"created_at":"2025-01-26T10:13:29.968Z","updated_at":"2025-10-08T07:30:49.619Z","avatar_url":"https://github.com/AlexRogalskiy.png","language":"TypeScript","funding_links":["https://opencollective.com/nullables","https://patreon.com/AlexRogalskiy","https://ko-fi.com/alexrogalskiy","https://issuehunt.io/r/AlexRogalskiy","https://www.nullables.io/","https://www.patreon.com/alexrogalskiy","https://www.buymeacoffee.com/AlexRogalskiy"],"categories":[],"sub_categories":[],"readme":"# *Tag Replacer*\n\n\u003e GitHub Action to replace tags in files\n\n[![GitHub marketplace](https://img.shields.io/badge/marketplacegithub-tag--replacer-blue?logo=github)](https://github.com/marketplace/actions/tag-replacer)\n\n[![management: perfekt👌](https://img.shields.io/badge/management-perfekt👌-red.svg)](https://github.com/lekterable/perfekt)\n[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n![Mergify Status](https://img.shields.io/endpoint.svg?url=https://gh.mergify.io/badges/AlexRogalskiy/github-action-tag-replacer)\n[![Reviewed by Hound](https://img.shields.io/badge/Reviewed_by-Hound-8E64B0.svg)](https://houndci.com)\n[![Chat](https://img.shields.io/badge/chat-discussions-success.svg)](https://github.com/AlexRogalskiy/github-action-tag-replacer/discussions)\n\n[![DeepSource](https://deepsource.io/gh/AlexRogalskiy/github-action-tag-replacer.svg/?label=active+issues\\\u0026show_trend=true)](https://deepsource.io/gh/AlexRogalskiy/github-action-tag-replacer/?ref=repository-badge)\n[![DeepScan grade](https://deepscan.io/api/teams/11946/projects/16314/branches/347248/badge/grade.svg)](https://deepscan.io/dashboard#view=project\\\u0026tid=11946\\\u0026pid=16314\\\u0026bid=347248)\n![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/AlexRogalskiy/github-action-tag-replacer)\n![GitHub Release Date](https://img.shields.io/github/release-date/AlexRogalskiy/github-action-tag-replacer)\n![Lines of code](https://tokei.rs/b1/github/AlexRogalskiy/github-action-tag-replacer?category=lines)\n![GitHub closed issues](https://img.shields.io/github/issues-closed/AlexRogalskiy/github-action-tag-replacer)\n![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/AlexRogalskiy/github-action-tag-replacer)\n![GitHub repo size](https://img.shields.io/github/repo-size/AlexRogalskiy/github-action-tag-replacer)\n![GitHub last commit](https://img.shields.io/github/last-commit/AlexRogalskiy/github-action-tag-replacer)\n![GitHub language count](https://img.shields.io/github/languages/count/AlexRogalskiy/github-action-tag-replacer)\n![GitHub search hit counter](https://img.shields.io/github/search/AlexRogalskiy/github-action-tag-replacer/goto)\n![GitHub Repository branches](https://badgen.net/github/branches/AlexRogalskiy/github-action-tag-replacer)\n![GitHub Repository dependents](https://badgen.net/github/dependents-repo/AlexRogalskiy/github-action-tag-replacer)\n[![Renovatebot](https://badgen.net/badge/renovate/enabled/green?cache=300)](https://renovatebot.com/)\n[![Dependabot](https://img.shields.io/badge/dependabot-enabled-1f8ceb.svg?style=flat-square)](https://dependabot.com/)\n[![NewReleases](https://newreleases.io/badge.svg)](https://newreleases.io/github/AlexRogalskiy/github-action-tag-replacer)\n[![Hits-of-Code](https://hitsofcode.com/github/alexrogalskiy/github-action-tag-replacer?branch=master)](https://hitsofcode.com/github/alexrogalskiy/github-action-tag-replacer?branch=master/view?branch=master)\n[![dependencies Status](https://status.david-dm.org/gh/AlexRogalskiy/github-action-tag-replacer.svg)](https://david-dm.org/AlexRogalskiy/github-action-tag-replacer)\n[![dependencies Status](https://status.david-dm.org/gh/AlexRogalskiy/github-action-tag-replacer.svg)](https://david-dm.org/AlexRogalskiy/github-action-tag-replacer?type=dev)\n\n[![Codeac](https://static.codeac.io/badges/2-349793843.svg)](https://app.codeac.io/github/AlexRogalskiy/github-action-tag-replacer)\n[![Coverage Status](https://coveralls.io/repos/github/AlexRogalskiy/github-action-tag-replacer/badge.svg?branch=master)](https://coveralls.io/github/AlexRogalskiy/github-action-tag-replacer?branch=master)\n[![codebeat badge](https://codebeat.co/badges/bf5686f7-44b9-47ed-99f0-b2f8420122e5)](https://codebeat.co/projects/github-com-alexrogalskiy-github-action-tag-replacer-master)\n[![Total alerts](https://img.shields.io/lgtm/alerts/g/AlexRogalskiy/github-action-tag-replacer.svg?logo=lgtm\\\u0026logoWidth=18)](https://lgtm.com/projects/g/AlexRogalskiy/github-action-tag-replacer/alerts/)\n[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/AlexRogalskiy/github-action-tag-replacer.svg?logo=lgtm\\\u0026logoWidth=18)](https://lgtm.com/projects/g/AlexRogalskiy/github-action-tag-replacer/context:javascript)\n[![codecov](https://codecov.io/gh/AlexRogalskiy/github-action-tag-replacer/branch/master/graph/badge.svg?token=zSVS8RGHGZ)](https://codecov.io/gh/AlexRogalskiy/github-action-tag-replacer)\n[![CI](https://github.com/AlexRogalskiy/github-action-tag-replacer/workflows/CI/badge.svg)](https://github.com/AlexRogalskiy/github-action-tag-replacer/actions/workflows/build.yml)\n[![CircleCI](https://circleci.com/gh/AlexRogalskiy/github-action-tag-replacer.svg?style=shield)](https://circleci.com/gh/AlexRogalskiy/github-action-tag-replacer)\n[![GitHub Super-Linter](https://github.com/AlexRogalskiy/github-action-tag-replacer/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![ComVer](https://img.shields.io/badge/ComVer-compliant-brightgreen.svg)][repo]\n[![Public workflows that use this action.][total_usages]][search_results]\n[![Licence][license_id]][license_content]\n\n[![Chat](https://img.shields.io/badge/chat-discussions-success.svg)](https://github.com/AlexRogalskiy/github-action-tag-replacer/discussions)\n[![Open questions](https://img.shields.io/badge/Open-questions-blue.svg?style=flat-curved)](https://github.com/AlexRogalskiy/github-action-tag-replacer/labels/question)\n[![Open bugs](https://img.shields.io/badge/Open-bugs-red.svg?style=flat-curved)](https://github.com/AlexRogalskiy/github-action-tag-replacer/labels/bug)\n\n## *Table of contents*\n\n- [*Description*](#description)\n- [*Inputs*](#inputs)\n  - [`sourceData`](#sourcedata)\n  - [`prefix`](#prefix)\n  - [`suffix`](#suffix)\n  - [`sourceFile`](#sourcefile)\n  - [`placeholder`](#placeholder)\n  - [`replacement`](#replacement)\n- [*Outputs*](#outputs)\n  - [`changed`](#changed)\n- [*Examples*](#examples)\n- [*Visitor stats*](#visitor-stats)\n- [*Licensing*](#licensing)\n- [*Authors*](#authors)\n- [*Versioning*](#versioning)\n- [*Contribution*](#contribution)\n- [*Acknowledgement*](#acknowledgement)\n- [*Forks*](#forks)\n- [*Development Support*](#development-support)\n\n## *Description*\n\n\u003cp align=\"center\" style=\"text-align:center;\"\u003e\n    \u003ca href=\"https://www.typescriptlang.org/\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/typescript%20-%23323330.svg?\u0026logo=typescript\u0026logoColor=%23F7DF1E\" alt=\"Typescript\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://www.repostatus.org/#active\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/Project%20Status-Active-brightgreen\" alt=\"Project Status: Active – The project has reached a stable, usable state and is being actively developed.\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://badges.pufler.dev\"\u003e\n        \u003cimg src=\"https://badges.pufler.dev/created/AlexRogalskiy/github-action-tag-replacer\" alt=\"Project created status\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://badges.pufler.dev\"\u003e\n        \u003cimg src=\"https://badges.pufler.dev/updated/AlexRogalskiy/github-action-tag-replacer\" alt=\"Project updated status\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nProcesses input file by replacing tags with provided input parameters.\n\n## *Inputs*\n\n### `sourceData`\n\n**Optional** JSON data source file with action parameters:\n\n#### Complete parameters\n\n```json\n[\n    {\n        \"prefix\": \"\u003c!--views:info:marker:start--\u003e\\n\",\n        \"suffix\": \"\\n\u003c!--views:info:marker:end--\u003e\",\n        \"sourceFile\": \"./data/info.md\",\n        \"placeholder\": \"\u003c!--views:info:marker:start--\u003e[\\\\s\\\\S]*?\u003c!--views:info:marker:end--\u003e\",\n        \"replacement\": \"\u003cp align=\\\"center\\\" style=\\\"text-align:center;\\\"\u003eInfo data block\u003c/p\u003e\"\n    },\n    {\n        \"prefix\": \"\u003c!--views:readme:marker:start--\u003e\\n\",\n        \"suffix\": \"\\n\u003c!--views:readme:marker:end--\u003e\",\n        \"sourceFile\": \"./data/readme.md\",\n        \"placeholder\": \"\u003c!--views:readme:marker:start--\u003e[\\\\s\\\\S]*?\u003c!--views:readme:marker:end--\u003e\",\n        \"replacement\": \"\u003cp align=\\\"center\\\" style=\\\"text-align:center;\\\"\u003eReadme data block\u003c/p\u003e\"\n    },\n    {\n        \"prefix\": \"test data\\n\",\n        \"suffix\": \"\",\n        \"sourceFile\": \"./data/test.md\",\n        \"placeholder\": \"test data\",\n        \"replacement\": \"\u003cp align=\\\"center\\\" style=\\\"text-align:center;\\\"\u003eTest data block\u003c/p\u003e\"\n    }\n]\n```\n\n#### Basic parameters\n\n```json\n[\n    {\n        \"sourceFile\": \"./data/info.md\",\n        \"placeholder\": \"\u003c!--views:info:marker:start--\u003e[\\\\s\\\\S]*?\u003c!--views:info:marker:end--\u003e\",\n        \"replacement\": \"\u003cp align=\\\"center\\\" style=\\\"text-align:center;\\\"\u003eInfo data block\u003c/p\u003e\"\n    },\n    {\n        \"sourceFile\": \"./data/readme.md\",\n        \"placeholder\": \"\u003c!--views:readme:marker:start--\u003e[\\\\s\\\\S]*?\u003c!--views:readme:marker:end--\u003e\",\n        \"replacement\": \"\u003cp align=\\\"center\\\" style=\\\"text-align:center;\\\"\u003eReadme data block\u003c/p\u003e\"\n    },\n    {\n        \"sourceFile\": \"./data/test.md\",\n        \"placeholder\": \"test data\",\n        \"replacement\": \"\u003cp align=\\\"center\\\" style=\\\"text-align:center;\\\"\u003eTest data block\u003c/p\u003e\"\n    }\n]\n```\n\n### `prefix`\n\n**Optional** String data to prepend before replacement\n\n### `suffix`\n\n**Optional** String data to append after replacement\n\n### `sourceFile`\n\n**Required** Input source file to replace in\n\n### `placeholder`\n\n**Required** String placeholder or regex to replace by\n\n### `replacement`\n\n**Required** String data to replace with\n\n## *Outputs*\n\n### `changed`\n\nFile processing operation status\n\n#### `true`\n\nWhen input source file successfully processed\n\n#### `false`\n\nWhen error occurred while processing input source file\n\n## *Examples*\n\n```yml\n- name: Replace file placeholders\n  uses: alexrogalskiy/github-action-tag-replacer@master\n  with:\n    prefix: '\u003c!--views:marker:start--\u003e\\n'\n    suffix: '\\n\u003c!--views:marker:end--\u003e'\n    sourceFile: './data/info.md'\n    placeholder: '\u003c!--views:marker:start--\u003e[\\s\\S]*?\u003c!--views:marker:end--\u003e'\n    replacement: '\u003cp align=\"center\" style=\"text-align:center;\"\u003eData Block\u003c/p\u003e'\n```\n\nRunning locally:\n\n- `npm run start:action --action github-action-tag-replacer --prefix '\u003c!--views:marker:start--\u003e\\n' --suffix '\\n\u003c!--views:marker:end--\u003e' --sourceFile './data/info.md' --placeHolder '\u003c!--views:marker:start--\u003e[\\s\\S]*?\u003c!--views:marker:end--\u003e' --replacement '\u003cp align=\"center\" style=\"text-align:center;\"\u003eData Block\u003c/p\u003e'`\n\n## *Visitor stats*\n\n[![GitHub page hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FAlexRogalskiy%2Fgithub-action-tag-replacer\\\u0026count_bg=%2379C83D\\\u0026title_bg=%23555555\\\u0026icon=\\\u0026icon_color=%23E7E7E7\\\u0026title=hits\\\u0026edge_flat=true)](https://hits.seeyoufarm.com)\n\n![GitHub stars](https://img.shields.io/github/stars/AlexRogalskiy/github-action-tag-replacer?style=social)\n![GitHub forks](https://img.shields.io/github/forks/AlexRogalskiy/github-action-tag-replacer?style=social)\n![GitHub watchers](https://img.shields.io/github/watchers/AlexRogalskiy/github-action-tag-replacer?style=social)\n\n## *Licensing*\n\n***Tag Replacer*** is distributed under LGPL version 3 or later,\n\\[[License](https://github.com/AlexRogalskiy/github-action-tag-replacer/blob/master/LICENSE)]. LGPLv3 is additional\npermissions on top of GPLv3.\n\n![license](https://user-images.githubusercontent.com/19885116/48661948-6cf97e80-ea7a-11e8-97e7-b45332a13e49.png)\n\n## *Authors*\n\n***Tag Replacer*** is maintained by the following GitHub team-members:\n\n- [![Author](https://img.shields.io/badge/author-AlexRogalskiy-FB8F0A)](https://github.com/AlexRogalskiy)\n\nwith community support please contact with us if you have some question or proposition.\n\n## *Versioning*\n\nThe project uses [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on\nthis repository][tags].\n\n## *Contribution*\n\n[![Contributors Display](https://badges.pufler.dev/contributors/AlexRogalskiy/github-action-tag-replacer?size=50\\\u0026padding=5\\\u0026bots=true)](https://badges.pufler.dev)\n\nPlease read\n[CONTRIBUTING.md](https://github.com/AlexRogalskiy/github-action-tag-replacer/blob/master/.github/CONTRIBUTING.md)\nfor details on our code of conduct, and the process for submitting pull requests to us\n([emoji key](https://allcontributors.org/docs/en/emoji-key)).\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors)\nspecification. Contributions of any kind are welcome!\n\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n![Github contributors](https://img.shields.io/github/all-contributors/AlexRogalskiy/github-action-tag-replacer)\n\nSee also the list of [contributors][contributors] who participated in this project.\n\n## *Acknowledgement*\n\n[![Stargazers repo roster for @AlexRogalskiy/github-action-tag-replacer](https://reporoster.com/stars/AlexRogalskiy/github-action-tag-replacer)][stars]\n\n## *Forks*\n\n[![Forkers repo roster for @AlexRogalskiy/github-action-tag-replacer](https://reporoster.com/forks/AlexRogalskiy/github-action-tag-replacer)][forkers]\n\n## *Development Support*\n\nLike ***Tag Replacer*** ? Consider buying me a coffee :)\n\n[![Become a Patron](https://img.shields.io/badge/Become_Patron-Support_me_on_Patreon-blue.svg?style=flat-square\\\u0026logo=patreon\\\u0026color=e64413)](https://www.patreon.com/alexrogalskiy)\n[![Buy Me A Coffee](https://img.shields.io/badge/Donate-Buy%20me%20a%20coffee-yellow.svg?logo=buy%20me%20a%20coffee)](https://www.buymeacoffee.com/AlexRogalskiy)\n[![KoFi](https://img.shields.io/badge/Donate-Buy%20me%20a%20coffee-yellow.svg?logo=ko-fi)](https://ko-fi.com/alexrogalskiy)\n\n***\n\n[![forthebadge](https://img.shields.io/badge/made%20with-%20typescript-C1282D.svg?logo=typescript\\\u0026style=for-the-badge)](https://www.typescriptlang.org/)\n[![forthebadge](https://img.shields.io/badge/powered%20by-%20github-7116FB.svg?logo=github\\\u0026style=for-the-badge)](https://github.com/)\n[![forthebadge](https://img.shields.io/badge/build%20with-%20%E2%9D%A4-B6FF9B.svg?logo=heart\\\u0026style=for-the-badge)](https://forthebadge.com/)\n\n[repo]: https://github.com/AlexRogalskiy/github-action-tag-replacer\n\n[tags]: https://github.com/AlexRogalskiy/github-action-tag-replacer/tags\n\n[issues]: https://github.com/AlexRogalskiy/github-action-tag-replacer/issues\n\n[pulls]: https://github.com/AlexRogalskiy/github-action-tag-replacer/pulls\n\n[wiki]: https://github.com/AlexRogalskiy/github-action-tag-replacer/wiki\n\n[stars]: https://github.com/AlexRogalskiy/github-action-tag-replacer/stargazers\n\n[forkers]: https://github.com/AlexRogalskiy/github-action-tag-replacer/network/members\n\n[contributors]: https://github.com/AlexRogalskiy/github-action-tag-replacer/graphs/contributors\n\n[license_id]: https://img.shields.io/github/license/AlexRogalskiy/github-action-tag-replacer\n\n[license_content]: https://github.com/AlexRogalskiy/github-action-tag-replacer/blob/master/LICENSE\n\n[total_usages]: https://img.shields.io/endpoint?url=https%3A%2F%2Fapi-git-master.endbug.vercel.app%2Fapi%2Fgithub-actions%2Fused-by%3Faction%3DAlexRogalskiy%2Fgithub-action-tag-replacer%26badge%3Dtrue\n\n[search_results]: https://github.com/search?o=desc\u0026q=AlexRogalskiy/github-action-tag-replacer+path%3A.github%2Fworkflows+language%3AYAML\u0026s=\u0026type=Code\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexrogalskiy%2Fgithub-action-tag-replacer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexrogalskiy%2Fgithub-action-tag-replacer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexrogalskiy%2Fgithub-action-tag-replacer/lists"}