Update mirror-to-codecommit.yml #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Mirroring | |
on: [push, delete] | |
jobs: | |
to_gitlab: | |
runs-on: ubuntu-latest | |
steps: # <-- must use actions/checkout before mirroring! | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: pixta-dev/repository-mirroring-action@v1 | |
with: | |
target_repo_url: | |
ssh://git-codecommit.eu-west-1.amazonaws.com/v1/repos/test-repo-backup | |
ssh_private_key: # <-- use 'secrets' to pass credential information. | |
${{ secrets.GITLAB_SSH_PRIVATE_KEY }} | |
to_codecommit: # <-- different jobs are executed in parallel. | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: pixta-dev/repository-mirroring-action@v1 | |
with: | |
target_repo_url: | |
ssh://git-codecommit.eu-west-1.amazonaws.com/v1/repos/test-repo-backup | |
ssh_private_key: | |
${{ secrets.CODECOMMIT_SSH_PRIVATE_KEY }} | |
ssh_username: # <-- (for codecommit) you need to specify ssh-key-id as ssh username. | |
${{ secrets.CODECOMMIT_SSH_PRIVATE_KEY_ID }} |