Skip to content

Commit

Permalink
index helm repo
Browse files Browse the repository at this point in the history
  • Loading branch information
petar-cvit committed Dec 30, 2024
1 parent 7aa05ff commit 075bb2d
Showing 1 changed file with 60 additions and 12 deletions.
72 changes: 60 additions & 12 deletions .github/workflows/helm-chart-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,68 @@ on:
push:
paths:
- 'install/chart/**'
branches:
- main
- '.github/workflows/helm-chart-update.yml'
# branches:
# - main

jobs:
test:
# push-oci:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Push Helm chart to Cyclops OCI
# run: |
# helm package install/chart
# helm push cyclops-chart-$(yq .version install/chart/Chart.yaml).tgz oci://registry-1.docker.io/cyclopsui

push-helm-repo:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push Helm chart to Cyclops OCI
- name: Checkout Source Repository
uses: actions/checkout@v3

- name: Setup Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- name: Package Helm Charts
working-directory: install/chart
run: |
helm package install/chart
helm push cyclops-chart-$(yq .version install/chart/Chart.yaml).tgz oci://registry-1.docker.io/cyclopsui
mkdir -p ../packaged
helm package . -d ../packaged
- name: Update Index.yaml
working-directory: install/chart
run: |
helm repo index ../packaged --url https://cyclops-ui.github.io/helm
- name: print
run: |
ls install
ls -lah install/packaged
cat install/packaged/index.yaml
# - name: Checkout Target Repository
# uses: actions/checkout@v3
# with:
# repository: cyclops-ui/cyclops-ui.github.io
# ref: gh-pages
# token: ${{ secrets.TARGET_REPO_TOKEN }}
# path: target-repo
#
# - name: Sync Packaged Helm Charts
# run: |
# mkdir -p target-repo/helm
# cp -r ./packaged/* target-repo/helm/
# cd target-repo
# git config user.name "GitHub Actions"
# git config user.email "[email protected]"
# git add helm/
# git commit -m "Update Helm repo on changes to templates"
# git push

0 comments on commit 075bb2d

Please sign in to comment.