-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dde0433
commit 524ab4b
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Sync | ||
on: | ||
workflow_dispatch: {} | ||
schedule: | ||
- cron: "*/10 * * * *" | ||
|
||
jobs: | ||
sync: | ||
name: Sync With Upstream | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.BOT_GITHUB_TOKEN }} | ||
- run: | | ||
# Try GHA for now | ||
# git config user.name "GitHub Action" | ||
# git config user.email "[email protected]" | ||
git config --global user.name "depot-bot" | ||
git config --global user.email "[email protected]" | ||
git submodule init | ||
git submodule update --remote --merge | ||
export UPSTREAM="$(cd upstream && git remote get-url origin)" | ||
export COMMIT_SHA="$(cd upstream && git rev-parse HEAD)" | ||
git commit -am "Update upstream to ${UPSTREAM}/commit/${COMMIT_SHA}" || echo "No changes" | ||
git push origin main | ||
env: | ||
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} |