{"id":19147027,"url":"https://github.com/franzbischoff/replace_envs","last_synced_at":"2025-05-07T02:04:59.287Z","repository":{"id":37820780,"uuid":"313253390","full_name":"franzbischoff/replace_envs","owner":"franzbischoff","description":"This action has the simple task of replacing the placeholders of Environment Variables with their values.","archived":false,"fork":false,"pushed_at":"2024-06-16T15:56:37.000Z","size":815,"stargazers_count":7,"open_issues_count":4,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T02:04:53.184Z","etag":null,"topics":["actions","automation","variables"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/franzbischoff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-11-16T09:38:46.000Z","updated_at":"2025-01-24T14:40:49.000Z","dependencies_parsed_at":"2024-03-05T14:54:05.231Z","dependency_job_id":"060a0131-24d8-4987-92fa-d2a4f1ee0368","html_url":"https://github.com/franzbischoff/replace_envs","commit_stats":{"total_commits":124,"total_committers":18,"mean_commits":6.888888888888889,"dds":0.6209677419354839,"last_synced_commit":"86ea214b8f74e42850c1347bc49995099826f19f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franzbischoff%2Freplace_envs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franzbischoff%2Freplace_envs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franzbischoff%2Freplace_envs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/franzbischoff%2Freplace_envs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/franzbischoff","download_url":"https://codeload.github.com/franzbischoff/replace_envs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252798855,"owners_count":21805887,"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":["actions","automation","variables"],"created_at":"2024-11-09T07:48:47.745Z","updated_at":"2025-05-07T02:04:59.264Z","avatar_url":"https://github.com/franzbischoff.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/franzbischoff/replace_envs)\n\n\u003c!-- badges --\u003e\n![Licensed](https://github.com/franzbischoff/replace_envs/workflows/Licensed/badge.svg)\n![Build tests](https://github.com/franzbischoff/replace_envs/workflows/Build%20tests/badge.svg)\n![License](https://img.shields.io/badge/license-MIT-green)\n[![Language grade: JavaScript](https://img.shields.io/lgtm/grade/javascript/g/franzbischoff/replace_envs.svg?logo=lgtm\u0026logoWidth=18)](https://lgtm.com/projects/g/franzbischoff/replace_envs/context:javascript)\n\u003c!-- end badges --\u003e\n\n# Replace Environment Variables Action\n\nThis action has the simple task of replacing the placeholders of Environment Variables with their values.\n\nFor example, you have a README.md file in a template repository, and you want to have a link that points to your\nnew repository just after you 'fork' it.\n\nSo in your template repository, you may have a line like this:\n\n\u003e https://github.com/${GITHUB_REPOSITORY}/\n\nAnd this will be translated (as in this repository) as:\n\n\u003e https://github.com/franzbischoff/replace_envs/\n\nIn [this link](https://docs.github.com/en/free-pro-team@latest/actions/reference/environment-variables) is the default \nlist of environment variables that Github has set.\n\nIn addition, you may set your own variables in the workflow YAML file like this:\n\n```yaml\n    env:\n      MY_CUSTOM_VARIABLE: 'some value'\n```\n\nThat's all it does.\n\nLastly, just three comments:\n\n- I've created two new variables called `REPOSITORY_ACCOUNT` and `REPOSITORY_ACCOUNT` that is derived from the\n `GITHUB_REPOSITORY` variable, to make it easier to use in some use-cases.\n- The changes are by default `pushed` to the repository. If this action is part of a chain of steps, and you want to \npush the changes later, by yourself, you can disable this behavior with the parameter `commit: 'false'`.\n- The input and output file can be either a `template -\u003e definitive` or `definitive -\u003e definitive`; this just means that\n the input and output may be the same file. The later attempts to replace, by this action, will 'fail' safely without an\n  Error code.\n\n# Why use this action?\n\nI know there are other actions that accomplish the same objective, but:\n\n- This is self-contained (only needs to be preceded by actions/checkout)\n- It is plain JavaScript, few lines of code, easy to inspect and see that this action only does what it does.\n\n\n# Usage\n\nCreate a YAML file at `.github/workflows/myworkflow.yml`\n\u003e GITHUB_TOKEN must be set, otherwise this action cannot perform changes in your repository.\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n  - uses: franzbischoff/replace_envs@v1\n    env:\n      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      MY_CUSTOM_VARIABLE: 'some value'\n    with:\n      from_file: 'README.md'\n      to_file: 'README.md'\n      commit: 'true'\n```\n\n# Code of Conduct\nPlease note that this project is released with a Contributor [Code of Conduct](CODE_OF_CONDUCT.md). By contributing to\n this project, you agree to abide by its terms.\n\n# License\nThe scripts and documentation in this project are released under the [MIT License](LICENSE)\n\n# Contributions\nContributions are welcome!  See [Contributor's Guide](CONTRIBUTING.md)\n\n## Code of Conduct\n:wave: Be nice. See [the code of conduct](CODE_OF_CONDUCT.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranzbischoff%2Freplace_envs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffranzbischoff%2Freplace_envs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffranzbischoff%2Freplace_envs/lists"}