Skip to content

fix: charts uploading #67

fix: charts uploading

fix: charts uploading #67

Workflow file for this run

name: Release Charts
on:
push:
branches:
- main
jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout Charts
uses: actions/checkout@v4
with:
repository: prism-sh/helm-charts
token: "${{ secrets.CR_TOKEN }}"
path: .helm-charts
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v4
env:
GITHUB_TOKEN: "${{ secrets.CR_TOKEN }}"
- name: Install yq
run: |
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/local/bin/yq
chmod +x /usr/local/bin/yq
- name: Add repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.CR_TOKEN }}"
with:
install_only: true
- name: Package and Release Charts
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
# Get the next version
NEXT_VERSION=1.0.8-dev.31
echo "Next version: $NEXT_VERSION"
# Package the charts
mkdir -p .cr-release-packages
helm dependency update deploy/charts/*
helm package deploy/charts/* --destination .cr-release-packages --version $NEXT_VERSION --app-version $NEXT_VERSION
# Upload the charts
cr upload \
--owner prism-sh \
--git-repo prism-agent \
--push
- name: Update Helm Index
run: |
cd .helm-charts
cr index \
--owner prism-sh \
--git-repo prism-agent \
--pages-branch main \
--package-path ../.cr-release-packages \
--index-path index.yaml
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git add index.yaml
git commit -m "Update Helm repository index"
git push
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"