trigger-workflow-testkube-agent-main #146
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update application version on dispatch | |
on: | |
repository_dispatch: | |
types: | |
[ | |
trigger-workflow-testkube-cloud-api-main, | |
trigger-workflow-testkube-cloud-ui-main, | |
trigger-workflow-testkube-worker-service-main, | |
trigger-workflow-testkube-logs-service-main, | |
trigger-workflow-testkube-agent-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 | |
if: github.event.action != 'trigger-workflow-testkube-agent-main' | |
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: Update Agent version | |
if: github.event.action == 'trigger-workflow-testkube-agent-main' | |
run: | | |
echo "Bumping testkube-enterprise and Agent Helm-chart version" | |
./scripts/update.sh -c testkube-enterprise -g ${{ github.event.client_payload.agentVersion }} | |
# update Chart.lock | |
helm dependency update charts/testkube-enterprise | |
- name: Sync & Update Testkube Enterprise Helm chart | |
if: github.event.action != 'trigger-workflow-testkube-agent-main' | |
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/profiles/values.demo.yaml **/*values.yaml | |
git commit -m "updating testkube-enterprise chart version to ${{ env.ENTERPRISE_CHART_VERSION }}" | |
git push --force | |