{"id":13530714,"url":"https://github.com/cuchi/jinja2-action","last_synced_at":"2025-04-12T15:20:57.400Z","repository":{"id":41832358,"uuid":"238983592","full_name":"cuchi/jinja2-action","owner":"cuchi","description":"Use the Jinja2 template engine as a GitHub action","archived":false,"fork":false,"pushed_at":"2023-11-09T17:49:34.000Z","size":30,"stargazers_count":43,"open_issues_count":3,"forks_count":26,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-22T03:19:08.962Z","etag":null,"topics":["hacktoberfest","jinja2"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cuchi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-02-07T17:17:00.000Z","updated_at":"2023-12-19T05:23:19.000Z","dependencies_parsed_at":"2024-06-18T15:15:07.817Z","dependency_job_id":"0a562f80-d69c-4103-b991-d167fdf42647","html_url":"https://github.com/cuchi/jinja2-action","commit_stats":{"total_commits":28,"total_committers":4,"mean_commits":7.0,"dds":0.5,"last_synced_commit":"3fa06acb38601d3caea4c5ce0416e268a8799d71"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuchi%2Fjinja2-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuchi%2Fjinja2-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuchi%2Fjinja2-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cuchi%2Fjinja2-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cuchi","download_url":"https://codeload.github.com/cuchi/jinja2-action/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586217,"owners_count":21128998,"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":["hacktoberfest","jinja2"],"created_at":"2024-08-01T07:00:53.945Z","updated_at":"2025-04-12T15:20:57.393Z","avatar_url":"https://github.com/cuchi.png","language":"Python","funding_links":[],"categories":["Community Resources"],"sub_categories":["Utility"],"readme":"[![release](https://img.shields.io/github/v/release/cuchi/jinja2-action?style=flat-square)](https://github.com/cuchi/jinja2-action/releases/latest)\n[![marketplace](https://img.shields.io/badge/marketplace-jinja2--action-blue?logo=github\u0026style=flat-square)](https://github.com/marketplace/actions/jinja2-action)\n\nJinja2 is a fast and straightforward templating engine. You can use this action\nto easily run it in your GitHub workflows.\n\n\n# Using input variables\n```yml\n- name: Setup nginx\n  uses: cuchi/jinja2-action@v1.3.0\n  with:\n    template: infra/nginx.conf.j2\n    output_file: infra/nginx.conf\n    strict: true\n    variables: |\n      server_host=staging.example.com\n      timeout=30s\n```\n\n# Using data files\n```yml\n- name: Setup nginx\n  uses: cuchi/jinja2-action@v1.3.0\n  with:\n    template: infra/nginx.conf.j2\n    output_file: infra/nginx.conf\n    data_file: staging_config.json\n    data_format: json # Will try to guess from the extension instead (unnecessary in this case)\n```\n\n# Using environment variables\n```yml\n- name: Setup nginx\n  uses: cuchi/jinja2-action@v1.3.0\n  with:\n    template: infra/nginx.conf.j2\n    output_file: infra/nginx.conf\n  env:\n    SERVER_HOST: staging.example.com\n```\n\nEnvironment variables are used this way in the template file:\n```\n{{ env['SERVER_HOST'] }} \u003c-- This is always strict\n```\n```\n{{ env.get('SERVER_HOST') }} \u003c-- This is never strict, and displays `None` if you don't specify a default value\n```\n\n# See also\n- [Jinja2 docs](https://jinja.palletsprojects.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuchi%2Fjinja2-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcuchi%2Fjinja2-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcuchi%2Fjinja2-action/lists"}