Add backup workflow for Helm chart packaging This update introduces a new workflow for building and packaging the Helm chart for the backup application, named 'backup-build-chart.yml'. This workflow triggers on pushes to the main and dev branches that affect the 'artemis-broker-backup/Chart.yaml' file. Additionally, the existing build chart workflow has been renamed from 'build-chart.yml' to 'primary-build-chart.yml' to better reflect its purpose of handling the primary application. The app name has also been updated in the primary workflow environment variable for clarity. These changes help in better organizing the CI/CD processes for different Helm charts associated with the backup and primary applications, improving overall workflow management. ```
45 lines
1.6 KiB
YAML
45 lines
1.6 KiB
YAML
name: "Build Helm Chart"
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- dev
|
|
paths:
|
|
- "artemis-broker-backup/Chart.yaml"
|
|
|
|
jobs:
|
|
helm-package:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
APP: artemis-broker-backup
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set Helm Chart App Name and Version
|
|
id: get_version
|
|
run: |
|
|
APP_NAME=$(grep -oP '(?<=^name: ).*' ${{ env.APP }}/Chart.yaml)
|
|
echo "Helm Chart App Name: $APP_NAME"
|
|
echo "::set-output name=app::$APP_NAME"
|
|
|
|
CHART_VERSION=$(grep -oP '(?<=^version: ).*' ${{ env.APP }}/Chart.yaml)
|
|
echo "Helm Chart version: $CHART_VERSION"
|
|
echo "::set-output name=tag::$CHART_VERSION"
|
|
|
|
- name: Setup Helm
|
|
run: |
|
|
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
|
|
helm version
|
|
|
|
- name: Package Helm Chart
|
|
run: |
|
|
helm dependency update ${{ env.APP }}
|
|
helm lint ${{ env.APP }}
|
|
helm package ${{ env.APP }}
|
|
|
|
- name: Upload Helm Package to repo
|
|
run: |
|
|
curl --user ${{ secrets.USER }}:${{ secrets.TOKEN }} -X POST --upload-file ./${{ steps.get_version.outputs.app }}-${{ steps.get_version.outputs.tag }}.tgz ${{ vars.HELMREGISTRY }}/api/packages/${{ vars.OWNER }}/helm/api/charts
|
|
echo "--user ${{ secrets.USER }}:${{ secrets.TOKEN }} -X POST --upload-file ./${{ steps.get_version.outputs.app }}-${{ steps.get_version.outputs.tag }}.tgz ${{ vars.HELMREGISTRY }}/api/packages/${{ vars.OWNER }}/helm/api/charts"
|