From bc353f5fd1842462518bf92ff4f1a07904bdb623 Mon Sep 17 00:00:00 2001 From: yasaichi Date: Mon, 22 Nov 2021 10:00:18 +0900 Subject: [PATCH 1/2] Test against `actions/checkout@v2` --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 621c8ec..330eea4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 }} From 8dabb03aa7afde727e652fc7711287f1ca81f5ae Mon Sep 17 00:00:00 2001 From: yasaichi Date: Mon, 22 Nov 2021 10:02:14 +0900 Subject: [PATCH 2/2] Use `actions/checkout@v2` in the example of README --- README.md | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 9b9359e..f2be286 100644 --- a/README.md +++ b/README.md @@ -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: - git@gitlab.com:/.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: + git@gitlab.com:/.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..amazonaws.com/v1/repos/ - 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..amazonaws.com/v1/repos/ + 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 }} ```