Release GKS Template Helm Chart #35
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: Release GKS Template Helm Chart | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- 'charts/gks-template/**' | |
jobs: | |
publish-helm-chart: | |
runs-on: ubuntu-latest | |
env: | |
HARBOR_PROJECT_NAME: 'gks' | |
HELM_CHART_NAME: 'gks-template' | |
HELM_CHART_PATH: 'charts' | |
HELM_CHART_DESCRIPTION: 'Template chart' | |
VERSION: 'v1.0.${{ github.run_number }}' | |
GKS_HARBOR_ADDRESS: 'harbor.teamgeta.net' | |
outputs: | |
HARBOR_PROJECT_NAME: ${{ env.HARBOR_PROJECT_NAME }} | |
HELM_CHART_NAME: ${{ env.HELM_CHART_NAME }} | |
HELM_CHART_PATH: ${{ env.HELM_CHART_PATH }} | |
VERSION: ${{ env.VERSION }} | |
steps: | |
- | |
name: Checkout develop branch | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- | |
name: Set up Helm | |
uses: Geta/gks/actions/setup-helm@actions/v1 | |
with: | |
helm_repository_url: 'https://${{ env.GKS_HARBOR_ADDRESS }}/chartrepo' | |
helm_repository_user: ${{ secrets.GKS_HARBOR_USER }} | |
helm_repository_token: ${{ secrets.GKS_HARBOR_PASSWORD }} | |
helm_repository_project: ${{ env.HARBOR_PROJECT_NAME }} | |
- | |
name: Set template Helm chart info | |
uses: Geta/gks/actions/set-chart-info@actions/v1 | |
with: | |
chart_dir: '${{ env.HELM_CHART_PATH }}/${{ env.HELM_CHART_NAME }}' | |
chart_name: ${{ env.HELM_CHART_NAME }} | |
chart_description: ${{ env.HELM_CHART_DESCRIPTION }} | |
chart_version: ${{ env.VERSION }} | |
chart_app_version: ${{ env.VERSION }} | |
- | |
name: Lint Helm Chart | |
uses: Geta/gks/actions/lint-helm-chart@actions/v1 | |
with: | |
chart_dir: '${{ env.HELM_CHART_PATH }}/${{ env.HELM_CHART_NAME }}' | |
- | |
name: Generate README | |
uses: Geta/gks/actions/generate-chart-readme@actions/v1 | |
with: | |
chart_dir: '${{ env.HELM_CHART_PATH }}/${{ env.HELM_CHART_NAME }}' | |
- | |
name: Push template Helm chart | |
id: package | |
uses: Geta/gks/actions/package-helm-chart@actions/v1 | |
with: | |
chart_dir: '${{ env.HELM_CHART_PATH }}/${{ env.HELM_CHART_NAME }}' | |
chart_name: ${{ env.HELM_CHART_NAME }} | |
chart_version: ${{ env.VERSION }} | |
helm_repository_project: ${{ env.HARBOR_PROJECT_NAME }} | |
push: true |