Files
solidtime-chart/.gitea/workflows/publish-chart.yaml
Olof Pettersson 55bf81ff14
Some checks failed
Publish Helm Chart / publish (push) Failing after 10s
Initial chart commit
2025-12-10 20:29:40 +01:00

43 lines
1.2 KiB
YAML

name: Publish Helm Chart
on:
push:
branches:
- main
paths:
- 'Chart.yaml' # Only trigger if version changes or main is updated
jobs:
publish:
runs-on: ubuntu-latest # Or whatever label your runner uses
container:
image: alpine/helm:3.12.0 # Use an image with Helm pre-installed
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: helm dependency update .
- name: Package Chart
run: helm package .
- name: Login to Registry
run: |
# Gitea automatically provides the token and actor variables
echo ${{ secrets.GITEA_TOKEN }} | helm registry login ${{ gitea.server_url }} \
--username ${{ gitea.actor }} \
--password-stdin
- name: Push to Gitea Registry
run: |
# Clean the protocol (https://) from the URL for OCI
DOMAIN=${{ gitea.server_url }}
DOMAIN=${DOMAIN#*//}
# Find the packaged .tgz file
CHART_FILE=$(ls *.tgz)
# Push to the OCI registry
# URL Format: oci://<domain>/<user/org>/charts
helm push $CHART_FILE oci://$DOMAIN/${{ gitea.actor }}/charts