Categorygithub.com/yukitsune/template-cli
modulepackage
0.1.0
Repository: https://github.com/yukitsune/template-cli.git
Documentation: pkg.go.dev

# README

🏗 Render Go Template 🚧

Harness the power of Go templates in a lightweight CLI or GitHub Action

GitHub Workflow Status Go Report Card License Latest Release

Quick start

GitHub Action

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 (source). Feel free to use this as a guide!

CLI

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