Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yukitsune/template-cli
A GitHub Action and CLI tool for rendering Go templates
https://github.com/yukitsune/template-cli
actions go template
Last synced: 9 days ago
JSON representation
A GitHub Action and CLI tool for rendering Go templates
- Host: GitHub
- URL: https://github.com/yukitsune/template-cli
- Owner: YuKitsune
- License: mit
- Created: 2022-02-11T08:17:05.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-21T10:41:00.000Z (almost 2 years ago)
- Last Synced: 2024-12-19T07:17:57.240Z (19 days ago)
- Topics: actions, go, template
- Language: Go
- Homepage:
- Size: 47.9 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
🏗 Render Go Template 🚧
Harness the power of Go templates in a lightweight CLI or GitHub Action[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/YuKitsune/template-cli/ci.yml?branch=main)](https://github.com/YuKitsune/camogo/actions/workflows/ci.yml)
[![Go Report Card](https://goreportcard.com/badge/github.com/YuKitsune/template-cli)](https://goreportcard.com/report/github.com/YuKitsune/template-cli)
[![License](https://img.shields.io/github/license/YuKitsune/template-cli)](https://github.com/YuKitsune/template-cli/blob/main/LICENSE)
[![Latest Release](https://img.shields.io/github/v/release/YuKitsune/template-cli?include_prereleases)](https://github.com/YuKitsune/template-cli/releases)# Quick start
## GitHub Action
```yaml
steps:
- name: Render template files
uses: yukitsune/[email protected]
with:
args: --input ./templates/file1 --input ./templates/file2 \
--value "person.name=Jason" \
--value "person.age=${{ secrets.PERSON_AGE }}" \
--value "secret=${{ secrets.GITHUB_TOKEN }}" \
--output .
```### Example workflow
This repo also contains an [example workflow](https://github.com/YuKitsune/template-cli/runs/5165039206?check_suite_focus=true) ([source](https://github.com/YuKitsune/template-cli/blob/main/.github/workflows/example.yml)).
Feel free to use this as a guide!## CLI
```shell
template -i ./templates/file1 -i ./templates/file2 \
-v "person.name=Jason" \
-v "person.age=${{ secrets.PERSON_AGE }}" \
-v "secret=${{ secrets.GITHUB_TOKEN }}" \
-o .
```# Contributing
Contributions are what make the open source community such an amazing place to be, learn, inspire, and create.
Any contributions you make are **greatly appreciated**.1. Fork the Project
2. Create your Feature Branch (`feature/AmazingFeature`)
3. Commit your Changes
4. Push to the Branch
5. Open a Pull Request