Skip to content

Commit

Permalink
Update sync-helm-chart.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
wansir authored Nov 11, 2024
1 parent 660c898 commit 8cd5b77
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/sync-helm-chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,21 @@ jobs:
- run: |
git config --global user.email "[email protected]"
git config --global user.name "ks-ci-bot"
git clone [email protected]:kubesphere-extensions/ks-extensions.git
git clone --depth 1 [email protected]:ks-ci-bot/ks-extensions.git -b main
git remote add upstream [email protected]:kubesphere-extensions/ks-extensions.git
git fetch upstream main
git checkout -b sync/gatekeeper/${GITHUB_REF#refs/*/} upstream/main
rm -rf ks-extensions/gatekeeper
OUTPUT=ks-extensions/gatekeeper make package
cd ks-extensions/
git add .
git commit -m "update gatekeeper helm chart"
git push origin master:sync/gatekeeper/${GITHUB_REF#refs/*/} --force
git push origin main:sync/gatekeeper/${GITHUB_REF#refs/*/} --force
- env:
GH_TOKEN: ${{ secrets.CIBOT_ACCESS_TOKEN }}
run: |
cd ks-extensions/
if [[ $(gh pr ls -H sync/gatekeeper/${GITHUB_REF#refs/*/} -B master) == "" ]]; then
gh pr create -H sync/gatekeeper/${GITHUB_REF#refs/*/} -B master --title "Update gatekeeper helm chart from ${GITHUB_REF#refs/*/}" --body "Update gatekeeper helm chart"
fi
if [[ $(gh pr ls -H sync/gatekeeper/${GITHUB_REF#refs/*/} -B main) == "" ]]; then
gh pr create -H sync/gatekeeper/${GITHUB_REF#refs/*/} -B main --title "Update gatekeeper helm chart from ${GITHUB_REF#refs/*/}" --body "Update gatekeeper helm chart"
fi

0 comments on commit 8cd5b77

Please sign in to comment.