updated helm version to 0.1.7 #14
Workflow file for this run
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 Elasti Helm Chart | |
on: | |
push: | |
tags: | |
- elasti-helm-v* | |
env: | |
HELM_REGISTRY_URL: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_REGISTRY_URL }} | |
HELM_REGISTRY_USERNAME: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_USERNAME }} | |
HELM_REGISTRY_PASSWORD: ${{ secrets.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_PASSWORD }} | |
HELM_CHART_REPOSITORY: ${{ vars.TRUEFOUNDRY_ARTIFACTORY_PUBLIC_HELM_REPOSITORY }} | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" | |
- name: Add yq through apt | |
run: | | |
sudo apt update && sudo apt install wget -y && sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq &&\ | |
sudo chmod +x /usr/bin/yq | |
- name: Helm registry login | |
run: | | |
helm registry login -u ${{ env.HELM_REGISTRY_USERNAME}} -p ${{ env.HELM_REGISTRY_PASSWORD }} ${{ env.HELM_REGISTRY_URL }} | |
- name: Helm push | |
run: | | |
cd charts | |
for CHART_DIR in $(ls -d */) | |
do | |
CHART_DIR=$(basename $CHART_DIR) | |
echo "CHARTDIR: $CHART_DIR/Chart.yaml" | |
# getting chart name and versions | |
CHART_NAME=$(yq '.name' $CHART_DIR/Chart.yaml) | |
CHART_VERSION=$(yq '.version' "$CHART_DIR"/Chart.yaml) | |
# packaging chart | |
helm dependency update $CHART_DIR | |
helm package $CHART_DIR | |
# pushing the helm charts | |
echo "Pushing Chart: $CHART_NAME" | |
echo "Version: $CHART_NAME-$CHART_VERSION.tgz" | |
helm push $CHART_NAME-$CHART_VERSION.tgz oci://${{ env.HELM_CHART_REPOSITORY}} | |
echo "Successfully pushed chart: $CHART_NAME" | |
done |