Skip to content

push gh pages repo changes #25

push gh pages repo changes

push gh pages repo changes #25

name: helm chart update
on:
push:
paths:
- 'install/chart/**'
- '.github/workflows/helm-chart-update.yml'
# branches:
# - main
jobs:
# 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:
- 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: |
mkdir -p ../packaged
helm package . -d ../packaged
- name: print
run: |
ls install
ls -lah install/packaged
- 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: cyclops-ui.github.io
- name: Sync Packaged Helm Charts
env:
GH_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
run: |
cp -r ./install/packaged/* cyclops-ui.github.io/helm/
cd cyclops-ui.github.io
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add helm/
git commit -m "Update Helm repo"
git push