Skip to content

Commit

Permalink
chore: Fix mirror repo sync (#882)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
sichanyoo and Sichan Yoo authored Dec 12, 2024
1 parent 2b7c80c commit acd52e4
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/repo-sync.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
name: Sync Staging Repo
name: Sync Mirror

on:
push:
branches:
- main
branches: [ main ]
workflow_dispatch:

jobs:
sync:
git-sync:
runs-on: ubuntu-latest

steps:
- name: Checkout smithy-swift
uses: actions/checkout@v4
- name: git-sync
uses: wei/git-sync@v3
with:
ref: main
- name: Add staging repo as remote with token
run: |
git remote add staging-repo https://${{ secrets.REPO_SYNC_AUTOMATION_USER_TOKEN }}@github.com/awslabs/private-smithy-swift-staging.git
- name: Push changes to staging repo
run: |
git push staging-repo main
source_repo: ${{ secrets.GIT_SYNC_SOURCE_REPO }}
source_branch: "main"
destination_repo: ${{ secrets.GIT_SYNC_DESTINATION_REPO }}
destination_branch: "main"
destination_ssh_private_key: ${{ secrets.GIT_SYNC_DESTINATION_SSH_PRIVATE_KEY }}

0 comments on commit acd52e4

Please sign in to comment.