Skip to content

Commit

Permalink
Merge pull request #1605 from FabianKramm/main
Browse files Browse the repository at this point in the history
build: update sync-config.yaml
  • Loading branch information
FabianKramm authored Mar 18, 2024
2 parents 5633f05 + 2297fd8 commit 9ce2825
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/sync-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,39 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Configure git
run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/
env:
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}

- name: Clone and update
run: |
git clone https://github.com/loft-sh/vcluster-config.git
git clone --single-branch https://github.com/loft-sh/vcluster-config.git
cp -R config vcluster-config/copy
cp -R config/. vcluster-config/config/
cp chart/values.schema.json vcluster-config/values.schema.json
cd vcluster-config
# Checkout new branch
git checkout -b sync-config
git add --all
# if there are no changes, exit early
if git diff-index --quiet HEAD --; then
exit 0
fi
# create commit
git checkout -b sync-config
# set git info
git config --global user.name "Loft Bot"
git config --global user.email 'loft-bot@users.noreply.github.com'
echo "Changes detected"
# commit changes
git add --all
git commit -m "chore: sync vCluster config"
git push -u origin -f sync-config
echo "Pushed commit to branch"
# create PR
gh pr create --title "Sync vCluster Config" --body "This is an automated PR generated to sync the vCluster config from https://github.com/loft-sh/vcluster to this repository"

0 comments on commit 9ce2825

Please sign in to comment.