-
Notifications
You must be signed in to change notification settings - Fork 4
37 lines (36 loc) · 1.32 KB
/
diff-values.yml
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
on: push
name: Check values files
jobs:
diff:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: debug
run: |
echo -e '#!/bin/bash\necho "Current date is:"\ndate' | tee ~/.local/bin/debug_test
chmod +x ~/.local/bin/debug_test
debug_test
~/.local/bin/debug_test
- name: Create helmfile docker shim
run: |
echo 'docker run --rm -v "${PWD}:/wd" ghcr.io/helmfile/helmfile:latest helmfile $*' \
tee ~/.local/bin/helmfile
chmod +x ~/.local/bin/helmfile
- name: Create yq docker shim
run: |
echo 'docker run --rm -v "${PWD}:/wd" --entrypoint yq ghcr.io/linuxserver/yq:latest $*' \
tee ~/.local/bin/yq
chmod +x ~/.local/bin/helmfile
- name: Diff generated value files
run: >
for env_dir in k8s/argocd/*; do
env=$(basename $env_dir)
for release_file in $env_dir/*.values.yaml; do
release=$(basename $release_file .values.yaml)
tmp_values_file=/tmp/$env.$release.yml
echo checking $k - [$env] [$release]
./bin/generate-values "$env" "$release" $tmp_values_file
diff tmp_values_file $release_file
done
done