Skip to content

Commit

Permalink
fix(helm-release): Added back Helm Chart release CI job
Browse files Browse the repository at this point in the history
Signed-off-by: Aymen Ben Tanfous <aymen.bentanfous@gmail.com>
  • Loading branch information
Aym3nTN committed Jul 10, 2024
1 parent f66bfc4 commit d76c7cc
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0

- name: Build
run: |
Expand All @@ -73,6 +74,34 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Install helm
uses: azure/setup-helm@v4

- name: Update helm chart version and publish it to main branch
run: |
git checkout main
sed -Ei \
-e 's/^(version\:) .*/\1 '${{ env.VERSION }}'/g' \
-e 's/^(appVersion\:) .*/\1 "'${{ env.VERSION }}'"/g' \
charts/dragonfly-operator/Chart.yaml
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git commit \
-m 'chore(helm-chart): update to ${{ env.VERSION }}' \
charts/dragonfly-operator/Chart.yaml
git push
- name: Push Helm chart as OCI to Github
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | \
helm registry login -u ${{ github.actor }} --password-stdin ghcr.io
helm package charts/dragonfly-operator
helm push dragonfly-operator-${{ env.VERSION }}.tgz oci://ghcr.io/dragonflydb/dragonfly-operator/helm
- name: Build and Publish image into GHCR
uses: docker/build-push-action@v5
with:
Expand Down Expand Up @@ -100,4 +129,5 @@ jobs:
Release ${{ github.ref_name }}
Docker image: ghcr.io/dragonflydb/operator:${{ github.ref_name }}
Helm chart: oci://ghcr.io/dragonflydb/dragonfly-operator/helm
draft: true

0 comments on commit d76c7cc

Please sign in to comment.