Skip to content

Commit 3faa42d

Browse files
Github action to sync internal repo to public (#3959)
Signed-off-by: Bhushan Sonawane <quic_bhushans@quicinc.com>
1 parent 7dd720a commit 3faa42d

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/repo-sync.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Forward AIMET commits to public repo (Test)
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
repo-sync:
10+
runs-on: ubuntu-latest
11+
env:
12+
INTERNAL_REPO_DIR: "aimet-repo"
13+
INTERNAL_SRC_BRANCH: "develop"
14+
# TODO: rename to develop when we start one-way push
15+
PUBLIC_DST_BRANCH: "dev/bhushans/test-sync"
16+
steps:
17+
- name: Checkout internal repo
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ env.INTERNAL_SRC_BRANCH }}
21+
path: ${{ env.INTERNAL_REPO_DIR }}
22+
fetch-depth: 0
23+
- name: Push to public repository
24+
run: |
25+
cd ${INTERNAL_REPO_DIR}
26+
git remote add public-origin https://${{ secrets.PUBLIC_REPO_PAT }}@github.com/quic/aimet.git
27+
git push public-origin ${{ env.INTERNAL_SRC_BRANCH }}:${{ env.PUBLIC_DST_BRANCH }}
28+

0 commit comments

Comments
 (0)