Skip to content

A GitHub Action and CLI tool for rendering Go templates

License

Notifications You must be signed in to change notification settings

YuKitsune/template-cli

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏗 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