Skip to content

feat: use git-sync action to sync with private mirror #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 14, 2021

Conversation

trivikr
Copy link
Contributor

@trivikr trivikr commented Sep 14, 2021

Issue #, if available:
Similar to aws/aws-sdk-js-v3#1965

Description of changes:
use git-sync action to sync with private mirror

Testing:
Testing done with the following packages:

Config tested: https://github.com/trivikr/git-sync-test/blob/302d7d5cf429594757c9a32ead5e0816715f9b95/.github/workflows/git-sync.yml
Example GitHub Action run: https://github.com/trivikr/git-sync-test/runs/1778705960?check_suite_focus=true

Verified that secrets are not shown in the GitHub Action log

GitHub Action log
Cloning into '/root/source'...
[email protected]:***.git:main
[email protected]:***.git:main
Warning: Permanently added 'github.com,140.82.113.3' (RSA) to the list of known hosts.
* main                302d7d5 [source/main] chore: update step name to git-sync
  remotes/source/HEAD -> source/main
  remotes/source/main 302d7d5 chore: update step name to git-sync
Warning: Permanently added the RSA host key for IP address '140.82.114.4' to the list of known hosts.
To github.com:***.git
   de881a8..302d7d5  main -> main

Note that:

  • source GitHub URL is hidden [email protected]:***.git:main
  • destination GitHub URL is hidden [email protected]:***.git:main
  • destination GitHub URL is hidden in git output To github.com:***.git

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr requested a review from a team as a code owner September 14, 2021 22:37
@trivikr
Copy link
Contributor Author

trivikr commented Sep 14, 2021

Values populated in GitHub repositories:

  • Source repo awslabs/smithy-typescript
    • secrets.GIT_SYNC_SOURCE_REPO
    • secrets.GIT_SYNC_DESTINATION_REPO
    • secrets.GIT_SYNC_SOURCE_SSH_PRIVATE_KEY
    • secrets.GIT_SYNC_DESTINATION_SSH_PRIVATE_KEY
    • deploy public key for secrets.GIT_SYNC_SOURCE_SSH_PRIVATE_KEY
  • Destination repo **private**
    • deploy public key for secrets.GIT_SYNC_DESTINATION_SSH_PRIVATE_KEY

@trivikr trivikr merged commit b4196fa into smithy-lang:main Sep 14, 2021
@trivikr trivikr deleted the git-sync branch September 14, 2021 22:51
@trivikr
Copy link
Contributor Author

trivikr commented Sep 14, 2021

Verified that git-sync run was successful.
GitHub Action run: https://github.com/awslabs/smithy-typescript/runs/3604393420

Verified that force-push was successful on the main branch of private mirror.

srchase pushed a commit to srchase/smithy-typescript that referenced this pull request Mar 17, 2023
srchase pushed a commit that referenced this pull request Mar 23, 2023
srchase pushed a commit that referenced this pull request Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants