Compare commits

..

6 Commits

Author SHA1 Message Date
c202087df8
asdas
Some checks failed
Lint Shell files / shellcheck (pull_request) Successful in 25s
check-and-test / check-and-test (pull_request) Failing after 24s
check-and-test / helm-schema-values (pull_request) Successful in 11s
2025-04-03 21:57:46 +02:00
c2c15fa140
asd
Some checks failed
Lint Shell files / shellcheck (pull_request) Successful in 25s
check-and-test / check-and-test (pull_request) Failing after 25s
check-and-test / helm-schema-values (pull_request) Failing after 11s
2025-04-03 21:54:14 +02:00
c9cdb60dc2
chore(ci): add losisin/helm-values-schema-json-action
Some checks failed
Lint Shell files / shellcheck (pull_request) Successful in 24s
check-and-test / check-and-test (pull_request) Failing after 48s
check-and-test / helm-schema-values (pull_request) Successful in 21s
2025-04-03 21:50:33 +02:00
8c42d7320a
chore(ci): add losisin/helm-values-schema-json-action
Some checks failed
Lint Shell files / shellcheck (pull_request) Successful in 25s
check-and-test / check-and-test (pull_request) Failing after 47s
check-and-test / helm-schema-values (pull_request) Failing after 6s
2025-04-03 21:46:18 +02:00
600ccc9184
chore(ci): add losisin/helm-values-schema-json-action
Some checks failed
commitlint / check-and-test (pull_request) Failing after 28s
Lint Shell files / shellcheck (pull_request) Successful in 26s
check-and-test / check-and-test (pull_request) Failing after 54s
check-and-test / helm-schema-values (pull_request) Failing after 16s
2025-04-03 20:44:37 +02:00
7f868a0a27 chore(ci): add shellcheck (#7)
Reviewed-on: https://gitea.com/gitea/helm-actions/pulls/7
Reviewed-by: justusbunsi <justusbunsi@noreply.gitea.com>
Co-authored-by: Markus Pesch <markus.pesch@cryptic.systems>
Co-committed-by: Markus Pesch <markus.pesch@cryptic.systems>
2025-04-03 17:52:36 +00:00
6 changed files with 44 additions and 5 deletions

View File

@ -9,4 +9,7 @@ indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = false
insert_final_newline = false
[Makefile]
indent_style = tab

View File

@ -0,0 +1,14 @@
name: Lint Shell files
on:
pull_request:
branches: ["*"]
types: ["opened", "reopened", "synchronize"]
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- run: apt update --yes && apt install --yes shellcheck
- run: find . -type f -name "*.sh" -exec shellcheck -a {} \;

View File

@ -47,3 +47,17 @@ jobs:
git diff --exit-code --name-only README.md
- name: yaml lint
uses: https://github.com/ibiqlik/action-yamllint@v3
helm-schema-values:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.2
- name: Generate values schema json
uses: losisin/helm-values-schema-json-action@v1.6.2
with:
input: values.yaml
- name: Verify values.schema.json
run: |
if ! git diff --exit-code --name-only values.schema.json; then
echo "Please update the values.schema.json and be carefully of breaking changes!" 2&>1
fi

View File

@ -16,4 +16,7 @@ unittests-helm:
.PHONY: helm
update-helm-dependencies:
helm dependency update
.PHONY: yamllint
yamllint:
yamllint -c .yamllint .

View File

@ -8,9 +8,14 @@ check_token() {
set +e
echo "Checking for existing token..."
token="$(kubectl get secret "$SECRET_NAME" -o jsonpath="{.data['token']}" 2> /dev/null)"
[ $? -ne 0 ] && return 1
[ -z "$token" ] && return 2
if ! token=$(kubectl get secret "${SECRET_NAME}" -o jsonpath="{.data['token']}" 2> /dev/null); then
return 1
fi
if [ -z "${token}" ]; then
return 2
fi
return 0
}

0
values.schema.json Normal file
View File