https://github.com/clevyr/yampl-action
GitHub Action to invoke yampl during CI/CD.
https://github.com/clevyr/yampl-action
docker github-actions go-template kubernetes yaml
Last synced: 4 months ago
JSON representation
GitHub Action to invoke yampl during CI/CD.
- Host: GitHub
- URL: https://github.com/clevyr/yampl-action
- Owner: clevyr
- Created: 2022-06-27T17:54:09.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-27T23:02:14.000Z (almost 2 years ago)
- Last Synced: 2025-04-19T14:09:52.193Z (about 1 year ago)
- Topics: docker, github-actions, go-template, kubernetes, yaml
- Homepage: https://github.com/clevyr/yampl
- Size: 42 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# yampl-action
This action runs [yampl](https://github.com/clevyr/yampl) to template values in a yaml file.
See the [yampl](https://github.com/clevyr/yampl#readme) readme for more details on yampl templating capabilities.
## Usage
### Inputs
| Name | Description | Required | Default |
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|----------|
| `file` | Path to the file that should be patched. | `true` | |
| `vars` | List of vars to replace in the provided file. | `true` | |
| `commit_message` | If set, this action will invoke [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) with the given commit message. | `false` | `""` |
| `yampl_version` | The Yampl version to install. | `false` | `latest` |
### Outputs
None
## Example Workflow
Here is an example that fetches a separate deployment repo and patches its configuration.
```yaml
name: Patch Configuration
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- id: short-sha
uses: benjlevesque/short-sha@v1.2
- name: Bump version
uses: clevyr/yampl-action@v1
with:
file: deployment.yaml
vars: |
tag=${{ github.sha }}
commit_message: "chore: Bump deployment to ${{ steps.short-sha.outputs.sha }}"
```