{"id":25213348,"url":"https://github.com/olivr/inject-command-action","last_synced_at":"2025-10-31T12:02:29.071Z","repository":{"id":39404642,"uuid":"263274760","full_name":"Olivr/inject-command-action","owner":"Olivr","description":"GitHub action to inject the output of a command into a file of your repo.","archived":false,"fork":false,"pushed_at":"2023-01-06T05:40:22.000Z","size":1025,"stargazers_count":0,"open_issues_count":14,"forks_count":0,"subscribers_count":2,"default_branch":"v1","last_synced_at":"2025-03-12T08:48:26.351Z","etag":null,"topics":["actions","github","open-source"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Olivr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-12T08:15:05.000Z","updated_at":"2020-05-12T15:34:55.000Z","dependencies_parsed_at":"2023-02-05T11:02:21.600Z","dependency_job_id":null,"html_url":"https://github.com/Olivr/inject-command-action","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Olivr%2Finject-command-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Olivr%2Finject-command-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Olivr%2Finject-command-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Olivr%2Finject-command-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Olivr","download_url":"https://codeload.github.com/Olivr/inject-command-action/tar.gz/refs/heads/v1","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305906,"owners_count":20917202,"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","github","open-source"],"created_at":"2025-02-10T15:19:53.806Z","updated_at":"2025-10-31T12:02:29.021Z","avatar_url":"https://github.com/Olivr.png","language":"JavaScript","readme":"# Inject command action\n\n[![tests](https://github.com/olivr-com/inject-command-action/workflows/tests/badge.svg)](https://github.com/olivr-com/inject-command-action/actions?query=workflow%3Atests)\n\nGitHub action to inject the output of a command into a file of your repo.\n\nWe use this action to generate certain parts of our README with some third-party CLI tools.\n\n## Usage\n\n### Simple example\n\nIt will look for **two occurences** of `\u003c!-- auto-pwd --\u003e` in the file `README.md` and inject the output of `pwd | sed 's/\\// /g'` between these two occurences. If this action can't find these occurences, it will inject the output at the end of the `README.md` file.\n\n```yaml\nuses: olivr-com/inject-command-action@v1\nwith:\n  command: pwd | sed 's/\\// /g'\n  target: README.md\n```\n\n\u003e `\u003c!-- auto-pwd --\u003e` is used because the first command is **pwd**\n\n### Complete example\n\nIt will look for **two occurences** of `\u003c!-- generate-path-section --\u003e` in the file `README.md` and inject the output of `pwd | sed 's/\\// /g'` between these two occurences. If this action can't find them, it will **not** inject anything.\n\n```yaml\nuses: olivr-com/inject-command-action@v1\nwith:\n  command: pwd | sed 's/\\// /g'\n  target: README.md\n  pattern: \u003c!-- generate-path-section --\u003e\n  force: false\n```\n\n## Contribute\n\nCheckout the v1 branch\n\nInstall the dependencies\n\n```bash\nnpm install\n```\n\nRun the tests\n\n```bash\nnpm test\n```\n\n### Package for distribution\n\nGitHub Actions will run the entry point from the action.yml. Packaging assembles the code into one file that can be checked in to Git, enabling fast and reliable execution and preventing the need to check in node_modules.\n\nActions are run from GitHub repos. Packaging the action will create a packaged action in the dist folder.\n\nRun package\n\n```bash\nnpm run package\n```\n\nSince the packaged index.js is run from the dist folder.\n\n```bash\ngit add dist\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivr%2Finject-command-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folivr%2Finject-command-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivr%2Finject-command-action/lists"}