ci: Fix failing helm publish pipeline (#19133)

fixes: [18864](https://github.com/appsmithorg/appsmith/issues/18864)
This commit is contained in:
Goutham Pratapa 2022-12-27 08:02:19 +05:30 committed by GitHub
parent 9bb9a1081d
commit a65cfbe33e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,7 @@ jobs:
run: |
set -o xtrace
cat "${{ github.workspace }}/deploy/helm/Chart.yaml"
chart_version="$(awk '$1 == "version:" {print $2}' "${{ github.workspace }}/deploy/helm/Chart.yaml")"
chart_version="$(awk '$1 == "version:" {print $2}' "${{ github.workspace }}/deploy/helm/Chart.yaml" | head -1 )"
echo "version=$chart_version" >> $GITHUB_OUTPUT
# Scan the S3 bucket with the Helm version retrieved from Chart.yaml
# If an archive with this version already exists in the bucket, fail immediately.
@ -67,6 +67,8 @@ jobs:
AWS_EC2_METADATA_DISABLED: true
run: |
echo "Publishing new Helm chart version"
helm repo add bitnami https://charts.bitnami.com/bitnami
helm dep build
helm package .
aws s3 cp s3://${{ secrets.HELM_S3_BUCKET }}/index.yaml .
helm repo index . --url https://${{ secrets.HELM_S3_BUCKET }} --merge index.yaml