Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/sync-mirror.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Sync Mirror

on:
push:
branches: [ main ]
workflow_dispatch:

jobs:
git-sync:
# Only sync when pushing to source repo
if: github.repository == 'awslabs/aws-sdk-kotlin'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In what situations would this check fail? Why is it necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Swift team has it and I'm pretty sure it's so that a push to the destination repo doesn't trigger a sync. We want pushes to the source repo to trigger a sync but not pushes to the destination repo.

runs-on: ubuntu-latest
steps:
- name: git-sync
uses: wei/git-sync@v3
with:
source_repo: "https://aws-sdk-kotlin-ci:${{ secrets.CI_USER_PAT }}@github.com/awslabs/aws-sdk-kotlin.git"
source_branch: "main"
destination_repo: "https://aws-sdk-kotlin-ci:${{ secrets.CI_USER_PAT }}@github.com/awslabs/private-aws-sdk-kotlin-staging.git"
destination_branch: "main"
Loading