58 lines
1.3 KiB
YAML
58 lines
1.3 KiB
YAML
|
---
|
||
|
when:
|
||
|
event:
|
||
|
- push
|
||
|
|
||
|
.chart-testing-image: &chart-testing-image
|
||
|
image: quay.io/helmpack/chart-testing:v3.10.1
|
||
|
|
||
|
clone:
|
||
|
git:
|
||
|
image: woodpeckerci/plugin-git
|
||
|
settings:
|
||
|
partial: false
|
||
|
|
||
|
steps:
|
||
|
changed:
|
||
|
<<: *chart-testing-image
|
||
|
name: Check changed charts
|
||
|
commands:
|
||
|
- git fetch origin
|
||
|
- ct lint --target-branch main --print-config --debug
|
||
|
- ct list-changed --target-branch main > .changed
|
||
|
|
||
|
lint:
|
||
|
<<: *chart-testing-image
|
||
|
name: Lint charts
|
||
|
commands:
|
||
|
- git fetch origin
|
||
|
- |
|
||
|
if [ -s .changed ]; then
|
||
|
ct lint --target-branch main --validate-maintainers=false
|
||
|
fi
|
||
|
|
||
|
release:
|
||
|
<<: *chart-testing-image
|
||
|
name: Release charts
|
||
|
when:
|
||
|
- branch: main
|
||
|
secrets:
|
||
|
- gitea_token
|
||
|
environment:
|
||
|
- DISABLE_FORCE_OVERWRITE='true'
|
||
|
- ALLOW_OVERWRITE='false'
|
||
|
commands:
|
||
|
- |
|
||
|
helm registry login git.badhouseplants.net \
|
||
|
--username allanger \
|
||
|
--password $GITEA_TOKEN
|
||
|
- |
|
||
|
for chart in $(find charts -maxdepth 1 -mindepth 1 -type d); do
|
||
|
helm package $chart -d chart-packages;
|
||
|
done
|
||
|
- |
|
||
|
for chart in $(find chart-packages -maxdepth 1 -mindepth 1 -type f); do
|
||
|
helm push $chart oci://git.badhouseplants.net/softplayer
|
||
|
done
|
||
|
|