-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.1 KB
/
diff.yml
File metadata and controls
44 lines (37 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Diff
on:
workflow_dispatch:
inputs:
environment:
description: 'Environment to render'
required: true
type: choice
options:
- dev
- staging
- production
jobs:
diff:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install kustomize
uses: imranismail/setup-kustomize@v3
- name: Install Helm
uses: azure/setup-helm@v5
- name: Render overlays
run: |
mkdir -p rendered
find . -path "*/overlays/${{ inputs.environment }}/kustomization.yaml" -exec dirname {} \; | while read dir; do
name=$(echo "$dir" | sed 's|^\./||' | tr '/' '-')
echo "Rendering $dir ..."
kustomize build --enable-helm "$dir" > "rendered/${name}.yaml" || exit 1
done
echo "All overlays rendered."
- name: Upload rendered manifests
uses: actions/upload-artifact@v7
with:
name: rendered-${{ inputs.environment }}
path: rendered/
retention-days: 14