78 lines
2.0 KiB
YAML
78 lines
2.0 KiB
YAML
# FleetDM Stack - Gitea Actions
|
|
# CI: lint and validate chart on every push
|
|
# Release: package and publish on tag push (v*)
|
|
# Gitea-compatible: uses gitea context and gitea-release-action
|
|
|
|
name: Helm Chart CI & Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- master
|
|
# Release when tagging (e.g. git tag v0.1.0)
|
|
tag:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint Helm Chart
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://github.com/actions/checkout@v4
|
|
|
|
- name: Install Helm
|
|
run: |
|
|
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
|
helm version
|
|
|
|
- name: Lint chart
|
|
run: |
|
|
helm dependency update fleetdm-stack/
|
|
helm lint fleetdm-stack/
|
|
helm template fleetdm-stack fleetdm-stack/ --namespace fleetdm --debug 2>/dev/null | head -20
|
|
|
|
release:
|
|
name: Release Helm Chart
|
|
runs-on: ubuntu-latest
|
|
needs: lint
|
|
if: startsWith(gitea.ref, 'refs/tags/v')
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://github.com/actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install Helm
|
|
run: |
|
|
curl -fsSL https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
|
|
|
- name: Package chart
|
|
run: |
|
|
helm dependency update fleetdm-stack/
|
|
helm package fleetdm-stack/
|
|
mkdir -p .tmp
|
|
mv fleetdm-stack-*.tgz .tmp/
|
|
ls -la .tmp/
|
|
|
|
- name: Create Gitea Release
|
|
uses: https://gitea.com/actions/gitea-release-action@v1
|
|
with:
|
|
server_url: ${{ gitea.server_url }}
|
|
token: ${{ gitea.token }}
|
|
tag_name: ${{ gitea.ref_name }}
|
|
name: FleetDM Stack ${{ gitea.ref_name }}
|
|
body: |
|
|
Helm chart for FleetDM Server with MySQL and Redis.
|
|
files: .tmp/*.tgz
|