Skip to content

Commit

Permalink
Update sync.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
roothider committed Jan 9, 2025
1 parent 88d8863 commit 4f5ee76
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,30 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
submodules: recursive

- name: Merge upstream changes
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
set -e
set -x
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "[email protected]"
git remote add upstream https://github.com/theos/theos.git
git checkout master && git fetch upstream && git merge upstream/master
cd vendor/lib
git remote add upstream https://github.com/theos/lib.git
git checkout master && git fetch upstream && git merge upstream/master && git push
git submodule update --remote vendor/lib
git submodule update --remote vendor/include
git commit --all -m "[submodules] Update submodules to the latest commit" && git push || echo "No changes to submodules"
curl --fail -X PUT \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
https://api.github.com/repos/roothide/lib/actions/workflows/sync.yml/enable
curl --fail -X PUT \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.PERSONAL_ACCESS_TOKEN }}" \
https://api.github.com/repos/roothide/headers/actions/workflows/sync.yml/enable
cd -
cd vendor/include
git remote add upstream https://github.com/theos/headers.git
git checkout master && git fetch upstream && git merge upstream/master && git push
cd -
git commit --all -m "Sync Repo" && git push || echo "No changes"

0 comments on commit 4f5ee76

Please sign in to comment.