Skip to content

Commit

Permalink
Merge pull request #13 from yasaichi/test-against-checkout-v2
Browse files Browse the repository at this point in the history
Test against `actions/checkout@v2`
  • Loading branch information
yasaichi authored Nov 22, 2021
2 parents 5955b5f + 8dabb03 commit 394c61c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
if: "!contains(needs.check_preconditions.outputs.results, 'failure')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: ./
with:
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
Expand Down
42 changes: 23 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,30 @@ on: [push, delete]

jobs:
to_gitlab:
runs-on: ubuntu-18.04
steps: # <-- must use actions/checkout@v1 before mirroring!
- uses: actions/checkout@v1
- uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url:
[email protected]:<username>/<target_repository_name>.git
ssh_private_key: # <-- use 'secrets' to pass credential information.
${{ secrets.GITLAB_SSH_PRIVATE_KEY }}
runs-on: ubuntu-latest
steps: # <-- must use actions/checkout before mirroring!
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url:
[email protected]:<username>/<target_repository_name>.git
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-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url:
ssh://git-codecommit.<somewhere>.amazonaws.com/v1/repos/<target_repository_name>
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 }}
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: pixta-dev/repository-mirroring-action@v1
with:
target_repo_url:
ssh://git-codecommit.<somewhere>.amazonaws.com/v1/repos/<target_repository_name>
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 }}
```

0 comments on commit 394c61c

Please sign in to comment.