Push updated Helm charts #15
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: Push updated Helm charts | |
on: | |
workflow_run: | |
workflows: [Build and push container image] | |
types: | |
- completed | |
env: | |
QUAY_ORG: quay.io/jumpstarter-dev | |
jobs: | |
publish-helm-charts-containers: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get version | |
run: | | |
VERSION=$(git describe --long --tags) | |
VERSION=${VERSION#v} # remove the leading v prefix for version | |
echo "VERSION=${VERSION}" >> $GITHUB_ENV | |
echo "VERSION=${VERSION}" | |
- name: Build helm charts | |
run: | | |
echo packaging ${VERSION} | |
# patch the sub-chart app-version, because helm package won't do it | |
sed -i "s/^appVersion:.*/appVersion: $VERSION/" deploy/helm/jumpstarter/charts/jumpstarter-controller/Chart.yaml | |
helm package ./deploy/helm/jumpstarter --version "${VERSION}" --app-version "${VERSION}" | |
- name: Login helm | |
env: | |
PASSWORD: ${{ secrets.QUAY_TOKEN }} | |
USER: jumpstarter-dev+jumpstarter_ci | |
run: | |
helm registry login quay.io -u ${USER} -p ${PASSWORD} | |
- name: Push helm charts | |
run: | | |
helm push jumpstarter-*.tgz oci://${{ env.QUAY_ORG }}/helm |