Skip to content
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

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

Merged
merged 3 commits into from
Jan 27, 2021

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented Jan 27, 2021

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'...
SOURCE=git@github.com:***.git:main
DESTINATION=git@github.com:***.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 SOURCE=git@github.com:***.git:main
  • destination GitHub URL is hidden DESTINATION=git@github.com:***.git:main
  • destination GitHub URL is hidden in git output To github.com:***.git
Checklist
  • non-code related change (markdown/git settings etc)

@trivikr
Copy link
Member Author

trivikr commented Jan 27, 2021

Values populated in GitHub repositories:

  • Source repo aws/aws-sdk-js
    • 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

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • CodeBuild project: sdk-v2-github
  • Commit ID: 7cb422e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@AllanZhengYP AllanZhengYP merged commit 5ec1465 into aws:master Jan 27, 2021
@trivikr trivikr deleted the git-sync branch January 27, 2021 18:44
@trivikr
Copy link
Member Author

trivikr commented Jan 27, 2021

Verified that git-sync run was successful.
GitHub Action run: https://github.com/aws/aws-sdk-js/runs/1779077108?check_suite_focus=true

GitHub Action output
SOURCE=git@github.com:***.git:master
DESTINATION=git@github.com:***.git:master
Cloning into '/root/source'...
Warning: Permanently added 'github.com,140.82.112.4' (RSA) to the list of known hosts.
Warning: Permanently added the RSA host key for IP address '140.82.112.3' to the list of known hosts.
From github.com:***
 * [new branch]        client-side-monitoring -> client-side-monitoring
 * [new branch]        dependabot/bundler/redcarpet-3.5.1 -> dependabot/bundler/redcarpet-3.5.1
 * [new branch]        repo-sync              -> repo-sync
  client-side-monitoring                            e27ad211 sync with master
  dependabot/bundler/redcarpet-3.5.1                4b4d1efd Bump redcarpet from 3.2.0 to 3.5.1
* master                                            5ec14656 [source/master] feat: use git-sync action to sync with private mirror (#3610)
  repo-sync                                         aeb19a7e Updates SDK documentation
  remotes/source/HEAD                               -> source/master
  remotes/source/client-side-monitoring             e27ad211 sync with master
  remotes/source/dependabot/bundler/redcarpet-3.5.1 4b4d1efd Bump redcarpet from 3.2.0 to 3.5.1
  remotes/source/master                             5ec14656 feat: use git-sync action to sync with private mirror (#3610)
  remotes/source/repo-sync                          aeb19a7e Updates SDK documentation
Warning: Permanently added the RSA host key for IP address '140.82.114.3' to the list of known hosts.
To github.com:***.git
   aeb19a7e..5ec14656  master -> master

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

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.

None yet

3 participants