Skip to content

Commit

Permalink
sync upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
bradh352 committed Nov 19, 2024
1 parent 6e0b609 commit 605735d
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/sync_upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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:
- name: Checkout sonic-build
uses: actions/checkout@v4
with:
submodules: "recursive"
fetch-depth: 0
- name: Update
run: |
git config --global user.name '[github actions]'
git config --global user.email '[email protected]'
git pull
git remote add upstream https://github.com/sonic-net/sonic-buildimage.git
git fetch upstream
if ! git rebase upstream/master ; then
while ! git rebase --skip ; do
echo "Skipped Commit"
done
fi
cd src/sonic-swss
git checkout master-broadcom
git pull
cd ../sonic-sairedis
git checkout master-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"
fi
git push --force

0 comments on commit 605735d

Please sign in to comment.