Skip to content

Update mirror-to-codecommit.yml #4

Update mirror-to-codecommit.yml

Update mirror-to-codecommit.yml #4

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 }}