Merge pull request #1636 from P4sca1/helm-release
fix helm release workflow
This commit is contained in:
@@ -33,16 +33,21 @@ jobs:
|
|||||||
sudo apt-get install helm -y --no-install-recommends
|
sudo apt-get install helm -y --no-install-recommends
|
||||||
|
|
||||||
- name: Set versions
|
- name: Set versions
|
||||||
id: set_versions
|
|
||||||
run: |
|
run: |
|
||||||
if [[ ${{ github.event_name }} == 'release' ]]; then
|
if [[ ${{ github.event_name }} == 'release' ]]; then
|
||||||
CHART_VERSION="${{ github.event.release.tag_name }}"
|
TAG_NAME="${{ github.event.release.tag_name }}"
|
||||||
APP_VERSION="${{ github.event.release.tag_name }}"
|
|
||||||
|
# Remove the v prefix
|
||||||
|
VERSION=${TAG_NAME#v}
|
||||||
|
|
||||||
|
APP_VERSION="${VERSION}"
|
||||||
|
CHART_VERSION="${VERSION}"
|
||||||
else
|
else
|
||||||
CHART_VERSION="0.0.0-nightly-untagged-latest"
|
|
||||||
APP_VERSION="nightly"
|
APP_VERSION="nightly"
|
||||||
|
CHART_VERSION="0.0.0-nightly-untagged-latest"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "APP_VERSION set to ${APP_VERSION}"
|
||||||
echo "CHART_VERSION set to ${CHART_VERSION}. Validating..."
|
echo "CHART_VERSION set to ${CHART_VERSION}. Validating..."
|
||||||
|
|
||||||
# https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
|
# https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
|
||||||
@@ -55,8 +60,8 @@ jobs:
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "CHART_VERSION=${CHART_VERSION}" >> $GITHUB_OUTPUT
|
echo "CHART_VERSION=${CHART_VERSION}" >> "$GITHUB_ENV"
|
||||||
echo "APP_VERSION=${APP_VERSION}" >> $GITHUB_OUTPUT
|
echo "APP_VERSION=${APP_VERSION}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Update helm dependencies
|
- name: Update helm dependencies
|
||||||
run: helm dependency update ./functions/kubernetes/charts/shuffle
|
run: helm dependency update ./functions/kubernetes/charts/shuffle
|
||||||
@@ -68,4 +73,4 @@ jobs:
|
|||||||
run: helm registry login ghcr.io --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
|
run: helm registry login ghcr.io --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Push helm chart
|
- name: Push helm chart
|
||||||
run: helm push ./functions/kubernetes/charts/shuffle-*.tgz oci://ghcr.io/shuffle/shuffle/charts
|
run: helm push ./functions/kubernetes/charts/shuffle-*.tgz oci://ghcr.io/shuffle/charts
|
||||||
|
|||||||
Reference in New Issue
Block a user