Skip to content

Commit acd52e4

Browse files
sichanyooSichan Yoo
andauthored
chore: Fix mirror repo sync (#882)
* Use git-sync instead of built-in GitHub workflows for syncing private mirror repo to public repo. * SSH key unnnecessary for public source repo; update GIT_SYNC_SOURCE_REPO to https link as well. --------- Co-authored-by: Sichan Yoo <[email protected]>
1 parent 2b7c80c commit acd52e4

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

.github/workflows/repo-sync.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
name: Sync Staging Repo
1+
name: Sync Mirror
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [ main ]
76
workflow_dispatch:
87

98
jobs:
10-
sync:
9+
git-sync:
1110
runs-on: ubuntu-latest
11+
1212
steps:
13-
- name: Checkout smithy-swift
14-
uses: actions/checkout@v4
13+
- name: git-sync
14+
uses: wei/git-sync@v3
1515
with:
16-
ref: main
17-
- name: Add staging repo as remote with token
18-
run: |
19-
git remote add staging-repo https://${{ secrets.REPO_SYNC_AUTOMATION_USER_TOKEN }}@github.com/awslabs/private-smithy-swift-staging.git
20-
- name: Push changes to staging repo
21-
run: |
22-
git push staging-repo main
16+
source_repo: ${{ secrets.GIT_SYNC_SOURCE_REPO }}
17+
source_branch: "main"
18+
destination_repo: ${{ secrets.GIT_SYNC_DESTINATION_REPO }}
19+
destination_branch: "main"
20+
destination_ssh_private_key: ${{ secrets.GIT_SYNC_DESTINATION_SSH_PRIVATE_KEY }}

0 commit comments

Comments
 (0)