{"id":15421673,"url":"https://github.com/pedrolamas/handlebars-action","last_synced_at":"2025-04-19T15:26:32.341Z","repository":{"id":36965052,"uuid":"304154389","full_name":"pedrolamas/handlebars-action","owner":"pedrolamas","description":":octocat: Transform files in your repository with Handlebars templating!","archived":false,"fork":false,"pushed_at":"2025-04-15T07:34:33.000Z","size":3279,"stargazers_count":11,"open_issues_count":5,"forks_count":5,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-16T09:22:48.009Z","etag":null,"topics":["github","github-actions","handlebars","templating","workflow"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/handlebars-action","language":"TypeScript","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/pedrolamas.png","metadata":{"funding":{"github":"pedrolamas","patreon":"pedrolamas","ko_fi":"pedrolamas","custom":"https://paypal.me/pedrolamas"},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2020-10-14T22:55:20.000Z","updated_at":"2025-03-05T07:37:45.000Z","dependencies_parsed_at":"2024-10-20T17:19:53.990Z","dependency_job_id":null,"html_url":"https://github.com/pedrolamas/handlebars-action","commit_stats":{"total_commits":665,"total_committers":4,"mean_commits":166.25,"dds":0.08571428571428574,"last_synced_commit":"63943037c4f559b342261add2d39d26d5bcc9043"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":"actions/typescript-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrolamas%2Fhandlebars-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrolamas%2Fhandlebars-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrolamas%2Fhandlebars-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pedrolamas%2Fhandlebars-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pedrolamas","download_url":"https://codeload.github.com/pedrolamas/handlebars-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249228593,"owners_count":21233859,"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","github-actions","handlebars","templating","workflow"],"created_at":"2024-10-01T17:35:33.572Z","updated_at":"2025-04-19T15:26:32.309Z","avatar_url":"https://github.com/pedrolamas.png","language":"TypeScript","funding_links":["https://github.com/sponsors/pedrolamas","https://patreon.com/pedrolamas","https://ko-fi.com/pedrolamas","https://paypal.me/pedrolamas","https://www.patreon.com/pedrolamas"],"categories":[],"sub_categories":[],"readme":"# pedrolamas/handlebars-action\n\n[![Project Maintenance](https://img.shields.io/maintenance/yes/2024.svg)](https://github.com/pedrolamas/handlebars-action 'GitHub Repository')\n[![License](https://img.shields.io/github/license/pedrolamas/handlebars-action.svg)](https://github.com/pedrolamas/handlebars-action/blob/master/LICENSE 'License')\n\n[![CI](https://github.com/pedrolamas/handlebars-action/workflows/CI/badge.svg)](https://github.com/pedrolamas/handlebars-action/actions 'Build Status')\n\n[![Follow pedrolamas on Twitter](https://img.shields.io/twitter/follow/pedrolamas?label=Follow%20@pedrolamas%20on%20Twitter\u0026style=social)](https://twitter.com/pedrolamas)\n[![Follow pedrolamas on Mastodon](https://img.shields.io/mastodon/follow/109365776481898704?label=Follow%20@pedrolamas%20on%20Mastodon\u0026domain=https%3A%2F%2Fhachyderm.io\u0026style=social)](https://hachyderm.io/@pedrolamas)\n\n**Transform files in your repository with Handlebars templating!**\n\nThis action will find files in the repository matching a specific search spec and process them as [Handlebars](https://handlebarsjs.com) templates, writing the transformed content back to the same file or a new one.\n\nTemplates can use the full expression syntax of Handlebars, including the built-in helpers.\n\n## Usage\n\n```yaml\n- uses: pedrolamas/handlebars-action@v2\n  with:\n    # Files to process\n    # Default: '**/*.template'\n    files: '**/*.template'\n\n    # Output filename template\n    # Default: '{{ file.dir }}/{{ file.name }}'\n    output-filename: '{{ file.dir }}/{{ file.name }}'\n\n    # Remove the input file\n    # Default: false\n    delete-input-file: true\n\n    # HTML escape the rendered values\n    # Default: false\n    html-escape: false\n\n    # Makes no real changes\n    # default: false\n    dry-run: false\n```\n\n## Available tags\n\n### Environment variables\n\n- `{{ env.[name] }}` - The value of the environment variable called `[name]`. For example, `{{ env.GITHUB_REPOSITORY }}` will return the value of the `$GITHUB_REPOSITORY` environment variable.\n\n### Input file\n\n- `{{ file.path }}` - The full path of the input file used as template.\n- `{{ file.root }}` - The root of the input file path such as '/' or 'c:\\'.\n- `{{ file.dir }}` - The full directory path of the input file such as '/home/user/dir' or 'c:\\path\\dir'.\n- `{{ file.base }}` - The input file name including extension (if any) such as 'index.html'.\n- `{{ file.ext }}` - The input file extension (if any) such as '.html'.\n- `{{ file.name }}` - The input file name without extension (if any) such as 'index'.\n\n### Output file\n\n- `{{ outputFile.path }}` - The full path of the output file used as template.\n- `{{ outputFile.root }}` - The root of the output file path such as '/' or 'c:\\'.\n- `{{ outputFile.dir }}` - The full directory path of the output file such as '/home/user/dir' or 'c:\\path\\dir'.\n- `{{ outputFile.base }}` - The output file name including extension (if any) such as 'index.html'.\n- `{{ outputFile.ext }}` - The output file extension (if any) such as '.html'.\n- `{{ outputFile.name }}` - The output file name without extension (if any) such as 'index'.\n\n### GitHub context\n\n- `{{ github.action }}` - The name of the action currently running, or the [id](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsid) of a step. For example, for an action, `__repo-owner_name-of-action-repo`.\n- `{{ github.action_path }}` - The path where an action is located.\n- `{{ github.action_repository }}` - For a step executing an action, this is the owner and repository name of the action. For example, `actions/checkout`.\n- `{{ github.actor }}` - The name of the person or app that initiated the workflow. For example, `octocat`.\n- `{{ github.api_url }}` - Returns the API URL. For example: `https://api.github.com`.\n- `{{ github.base_ref }}` - Only set for forked repositories. The branch of the base repository.\n- `{{ github.env }}` - The path on the runner to the file that sets environment variables from workflow commands.\n- `{{ github.event_name }}` - The name of the webhook event that triggered the workflow.\n- `{{ github.event_path }}` - The path of the file with the complete webhook event payload. For example, `/github/workflow/event.json`.\n- `{{ github.graphql_url }}` - Returns the GraphQL API URL. For example: `https://api.github.com/graphql`.\n- `{{ github.head_ref }}` - Only set for forked repositories. The branch of the head repository.\n- `{{ github.job }}` - The [job_id](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_id) of the current job. For example, `greeting_job`.\n- `{{ github.path }}` - The path on the runner to the file that sets system PATH variables from workflow commands.\n- `{{ github.ref }}` - The branch or tag ref that triggered the workflow. For example, `refs/heads/feature-branch-1`. If neither a branch or tag is available for the event type, the variable will not exist.\n- `{{ github.ref_name }}` - The branch or tag name that triggered the workflow run. For example, `feature-branch-1`.\n- `{{ github.ref_protected }}` - `true` if branch protections are configured for the ref that triggered the workflow run.\n- `{{ github.ref_type }}` - The type of ref that triggered the workflow run. Valid values are `branch` or `tag`.\n- `{{ github.repository }}` - The owner and repository name. For example, `octocat/Hello-World`.\n- `{{ github.repository_name }}` - The repository name. For example, `Hello-World`.\n- `{{ github.repository_owner }}` - The repository owner's name. For example, `octocat`.\n- `{{ github.retention_days }}` - The number of days that workflow run logs and artifacts are kept. For example, `90`.\n- `{{ github.run_attempt }}` - A unique number for each attempt of a particular workflow run in a repository. This number begins at 1 for the workflow run's first attempt, and increments with each re-run. For example, `3`.\n- `{{ github.run_id }}` - A unique number for each run within a repository. This number does not change if you re-run the workflow run.\n- `{{ github.run_number }}` - A unique number for each run of a particular workflow in a repository. This number begins at 1 for the workflow's first run, and increments with each new run. This number does not change if you re-run the workflow run.\n- `{{ github.server_url }}` - Returns the URL of the GitHub server. For example: `https://github.com`.\n- `{{ github.sha }}` - The commit SHA that triggered the workflow. For example, `ffac537e6cbbf934b08745a378932722df287a53`.\n- `{{ github.workflow }}` - The name of the workflow.\n- `{{ github.workspace }}` - The GitHub workspace directory path. The workspace directory is a copy of your repository if your workflow uses the actions/checkout action. If you don't use the actions/checkout action, the directory will be empty. For example, `/home/runner/work/my-repo-name/my-repo-name`.\n- `{{ github.runner_arch }}` - The architecture of the runner executing the job. Possible values are `X86`, `X64`, `ARM`, or `ARM64`.\n- `{{ github.runner_name }}` - The name of the runner executing the job. For example, `Hosted Agent`.\n- `{{ github.runner_os }}` - The operating system of the runner executing the job. Possible values are `Linux`, `Windows`, or `macOS`.\n- `{{ github.runner_temp }}` - The path to a temporary directory on the runner. For example, `D:\\a\\_temp`.\n- `{{ github.runner_tool_cache }}` - The path to the directory containing preinstalled tools for GitHub-hosted runners. For example, `C:\\hostedtoolcache\\windows`.\n\n### Misc\n\n- `{{ date.year }}` - The year for the current date.\n- `{{ date.month }}` - The month for the current date.\n- `{{ date.day }}` - The day of the month for the current date.\n- `{{ date.hours }}` - The hours in the current date.\n- `{{ date.minutes }}` - The minutes in the current date.\n- `{{ date.seconds }}` - The seconds in the current date.\n- `{{ date.epochTime }}` - The number of milliseconds since the [ECMAScript epoch](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#the_ecmascript_epoch_and_timestamps).\n- `{{ date.timezoneOffset }}` - The difference, in minutes, between the current date as evaluated in the UTC time zone, and the same date as local time.\n- `{{ date.dateString }}` - The date portion of the current date, as output from `new Date().toDateString()`.\n- `{{ date.timeString }}` - The time portion of the current date, as output from `new Date().toTimeString()`.\n- `{{ date.fullString }}` - The current date, as output from `new Date().toString()`\n- `{{ date.isoString }}` - The current date, as output from `new Date().toISOString()`\n- `{{ date.utc.year }}` - The year for the current date, according to universal time.\n- `{{ date.utc.month }}` - The month for the current date, according to universal time.\n- `{{ date.utc.day }}` - The day of the month for the current date, according to universal time.\n- `{{ date.utc.hours }}` - The hours in the current date, according to universal time.\n- `{{ date.utc.minutes }}` - The minutes in the current date, according to universal time.\n- `{{ date.utc.seconds }}` - The seconds in the current date, according to universal time.\n- `{{ date.utc.fullString }}` - The current date, as output from `new Date().toUTCString()`\n\n## Support my work\n\nA lot of time and effort goes into the development of this and other open-source projects.\n\nIf you find this project valuable, please consider supporting my work by making a donation.\n\n[![Donate on Paypal](https://img.shields.io/badge/donate-paypal-blue.svg)](https://paypal.me/pedrolamas 'Donate on Paypal')\n[![Buy me a coffee](https://img.shields.io/badge/buy%20me%20a%20coffee-kofi-blue.svg)](https://ko-fi.com/pedrolamas 'Buy me a coffee')\n[![Support me on Patreon](https://img.shields.io/badge/join-patreon-blue.svg)](https://www.patreon.com/pedrolamas 'Support me on Patreon')\n[![Sponsor me on GitHub](https://img.shields.io/github/sponsors/pedrolamas.svg?label=github%20sponsors)](https://github.com/sponsors/pedrolamas 'Sponsor me on GitHub')\n\nThank you for your generosity and support! 🙏\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrolamas%2Fhandlebars-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedrolamas%2Fhandlebars-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrolamas%2Fhandlebars-action/lists"}