Files
coturn-kubernetes/.gitea/workflows/chart.yml
T
feedc0de 51ebf4a418
Publish and promote Helm chart / chart (push) Failing after 19s
Upload Helm packages with the Gitea API method
2026-10-18 17:35:03 +02:00

46 lines
1.6 KiB
YAML

name: Publish and promote Helm chart
on:
push:
pull_request:
jobs:
chart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0}
- uses: azure/setup-helm@v4
- name: Lint and render
run: |
helm lint chart --set externalIP=192.0.2.1
helm template coturn chart --set externalIP=192.0.2.1 >/dev/null
- name: Publish
if: gitea.ref == 'refs/heads/main'
run: |
version=$(./scripts/chart-version.sh)
echo "CHART_VERSION=${version}" >> "${GITHUB_ENV}"
mkdir -p dist
helm package chart --destination dist --version "${version}"
curl --fail-with-body --user "${{ secrets.PACKAGE_USERNAME }}:${{ secrets.PACKAGE_TOKEN }}" \
--request POST \
--upload-file "dist/coturn-${version}.tgz" \
https://code.brunner.ninja/api/packages/feedc0de/helm/api/charts
- name: Check out GitOps
if: gitea.ref == 'refs/heads/main'
uses: actions/checkout@v4
with:
repository: feedc0de/homelab-gitops
ref: main
token: ${{ secrets.GITOPS_TOKEN }}
path: homelab-gitops
- name: Promote
if: gitea.ref == 'refs/heads/main'
working-directory: homelab-gitops
run: |
./scripts/update-chart-version.sh coturn "${CHART_VERSION}"
git config user.name feedc0de
git config user.email feedc0de@users.noreply.code.brunner.ninja
git add bootstrap/coturn.yaml
if git diff --cached --quiet; then exit 0; fi
git commit -m "Deploy coturn chart ${CHART_VERSION}"
git push origin HEAD:main