Skip to content

trigger-workflow-testkube-cloud-ui-main #48

trigger-workflow-testkube-cloud-ui-main

trigger-workflow-testkube-cloud-ui-main #48

name: Release Helm charts - main on dispatch
on:
repository_dispatch:
types:
[
trigger-workflow-testkube-cloud-api-main,
trigger-workflow-testkube-cloud-ui-main,
trigger-workflow-testkube-worker-service-main,
]
jobs:
release-helm-charts:
name: Release Helm charts
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config --global user.name "testkube-cloud-ci-bot"
git config --global user.email "testkube-cloud-ci-bot@users.noreply.github.com"
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: v3.10.0
- name: Update Helm chart with changes files
run: |
# update application version
./scripts/update.sh \
-c ${{ github.event.client_payload.app }} \
-a ${{ github.event.client_payload.appVersion }} \
--verbose
echo -e "### ${{ github.event.client_payload.app }} Helm chart diff" >> $GITHUB_STEP_SUMMARY
echo -e '```' >> $GITHUB_STEP_SUMMARY
git --no-pager diff >> $GITHUB_STEP_SUMMARY
echo -e '```' >> $GITHUB_STEP_SUMMARY
# update helm chart version
new_chart_version=$(./scripts/update.sh -c ${{ github.event.client_payload.app }} --print-chart-version)
echo "CHART_VERSION=$new_chart_version" >> $GITHUB_ENV
- name: Sync & Update Testkube Enterprise Helm chart
run: |
echo "Syncing subchart versions in testkube-enterprise Helm chart"
./scripts/sync.sh
echo "Bumping testkube-enterprise Helm-chart version"
./scripts/update.sh -c testkube-enterprise --strategy patch
enterprise_chart_version=$(./scripts/update.sh -c testkube-enterprise --print-chart-version)
echo "ENTERPRISE_CHART_VERSION=$enterprise_chart_version" >> $GITHUB_ENV
echo -e "### Testkube Enterprise Helm chart diff" >> $GITHUB_STEP_SUMMARY
echo -e '```' >> $GITHUB_STEP_SUMMARY
git --no-pager diff charts/testkube-enterprise >> $GITHUB_STEP_SUMMARY
echo -e '```' >> $GITHUB_STEP_SUMMARY
- name: Check for changes in generated Helm docs models (helm-docs)
run: |
./scripts/helm-docs.sh
- name: Commit & push changes
run: |
git status
git add **/*Chart.yaml **/*README.md charts/testkube-enterprise/Chart.lock charts/testkube-enterprise/local-values.yaml **/*values.yaml
git commit -m "updating testkube-enterprise chart version to ${{ env.ENTERPRISE_CHART_VERSION }}"
git push --force
- name: Installing repositories
run: |
helm repo add dex https://charts.dexidp.io
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.6.0
with:
charts_dir: charts
env:
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CR_SKIP_EXISTING: true