Skip to content

Commit

Permalink
update action name, arg and include further test (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
tvandinther authored Jan 6, 2025
1 parent c74c97e commit 2a5868a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- uses: ./
- name: Use Action - Render
uses: ./
with:
filepath: example/main.k

- name: Check output
run: cat rendered/example.yaml
3 changes: 2 additions & 1 deletion action.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: knit
name: knit-render
description: A tool for managing kubernetes manifests with KCL
inputs:
filepath:
Expand All @@ -8,4 +8,5 @@ runs:
using: "docker"
image: "docker://ghcr.io/tvandinther/knit:v0.0.3"
args:
- render
- ${{ inputs.filepath }}
4 changes: 4 additions & 0 deletions example/main.k
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import vendored.helm.podinfo
import knit.helm
import knit.kustomize
import manifests
import file
import yaml

_chart = podinfo.Chart {
releaseName = "my-app"
Expand Down Expand Up @@ -30,3 +32,5 @@ _argocd = kustomize.build(kustomize.Kustomization {

# Outputs all kustomized podinfo and Argo CD resource manifests
manifests.yaml_stream(_kustomizedPodinfo + _argocd)
file.mkdir("rendered")
yaml.dump_all_to_file(_argocd, "rendered/example.yaml")

0 comments on commit 2a5868a

Please sign in to comment.