checkout gh pages repo #22
Workflow file for this run
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: 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 }} | |
- name: Sync Packaged Helm Charts | |
run: | | |
git status | |
ls -lah .. | |
ls -lah | |
mkdir -p cyclops-ui.github.io/helm | |
cp -r ./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 on changes to templates" | |
git push |