forked from sonic-net/sonic-buildimage
-
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
Showing
1 changed file
with
47 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,47 @@ | ||
name: 'Sync With Upstream' | ||
|
||
on: | ||
schedule: | ||
- cron: '30 0 * * *' | ||
tags-ignore: | ||
- '**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
sync_latest_from_upstream: | ||
runs-on: ubuntu-latest | ||
name: Sync latest commits from upstream repo | ||
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | ||
steps: | ||
- uses: tgymnich/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
base: 202405-broadcom | ||
head: 202405 | ||
merge_method: rebase | ||
|
||
# Now we need to update the hashes used for sonic-swss and sonic-sairedis | ||
- name: Checkout sonic-build | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 0 | ||
- name: Update hashes | ||
run: | | ||
git config --global user.name '[github actions]' | ||
git config --global user.email '[email protected]' | ||
git pull | ||
cd src/sonic-swss | ||
git checkout 202405-broadcom | ||
git pull | ||
cd ../sonic-sairedis | ||
git checkout 202405-broadcom | ||
git pull | ||
cd ../.. | ||
git add . | ||
if git status | grep "nothing to commit" > /dev/null ; then | ||
echo "nothing to commit" | ||
else | ||
git commit -am "update sonic-swss and sonic-sairedis branches" | ||
git push | ||
fi |