diff --git a/.github/workflows/package_and_push_helm_chart.yaml b/.github/workflows/package_and_push_helm_chart.yaml new file mode 100644 index 0000000..aaf8b39 --- /dev/null +++ b/.github/workflows/package_and_push_helm_chart.yaml @@ -0,0 +1,56 @@ +name: Package and Push Helm Chart + +on: + push: + branches: + - dev + - release + - devops/FAIRSPC-57_github_actions + workflow_dispatch: + inputs: + name: + description: "Manual trigger for Helm chart packaging and pushing" + release_type: + description: "Release or snapshot version?" + required: true + default: "SNAPSHOT" + options: + - "SNAPSHOT" + - "RELEASE" + +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Helm + uses: azure/setup-helm@v4.1.0 + with: + version: ${{ vars.HELM_VERSION }} + + - name: Login with Helm + run: | + echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ${{ vars.HELM_REGISTRY }} --username ${{ github.repository_owner }} --password-stdin + + - name: Add/update Helm dependencies + run: | + helm repo add jupyterhub https://jupyterhub.github.io/helm-chart + helm dependency update "charts/jupyter" + + - name: Prepare version + run: | + VERSION=$(cat ./VERSION) + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Push Helm chart to repository + run: | + helm package "charts/jupyter" --version ${{ env.VERSION }} + helm push "fairspace-jupyter-${{ env.VERSION }}.tgz" "oci://${{ vars.HELM_REGISTRY }}" + echo "Pushed package to repository" + + - name: Clean up + run: | + rm -rf "fairspace-jupyter*.tgz" diff --git a/charts/jupyter/Chart.yaml b/charts/jupyter/Chart.yaml index 5349077..a127eea 100644 --- a/charts/jupyter/Chart.yaml +++ b/charts/jupyter/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 appVersion: "1.0" description: Helm chart to install Jupyter along with a Fairspace workspace -name: jupyter +name: fairspace-jupyter version: 0.0.0-RELEASEVERSION dependencies: