pixta-dev / repository-mirroring-action

A GitHub Action for mirroring a repository to another repository
https://github.com/marketplace/actions/mirroring-repository
MIT License
240 stars 82 forks source link

v1.1.1 doesn't support neither actions/checkout@v3.3.0 nor actions/checkout@v3 #24

Closed fscarmen closed 1 year ago

fscarmen commented 1 year ago

Your repo is very usefully. We expect you can modify the program to support [actions/checkout@v3.3.0]. Thank you!

yasaichi commented 1 year ago

@fscarmen We tried to reproduce a bug (?) on #25, but couldn't. Will you please tell us more detail?

fscarmen commented 1 year ago

It 's ok when the checkout is v1

name: 'GitHub Actions Mirror'

on:
  workflow_dispatch:
#  push:
#    branches: 
#      - master
  schedule:
    - cron: '20 20 * * *'

jobs:
  mirror_to_gitlab:
    runs-on: ubuntu-latest
    steps:
      - name: 'Checkout'
        uses: actions/checkout@v1
      - name: 'Mirror to gitlab'
        uses: pixta-dev/repository-mirroring-action@v1
        with:
          target_repo_url:
            git@gitlab.com:fscarmen/warp_unlock.git
          ssh_private_key:
            ${{ secrets.PRIVATE_KEY }}

  mirror_to_bitbucket:
    runs-on: ubuntu-latest
    steps:
      - name: 'Checkout'
        uses: actions/checkout@v1
      - name: 'Mirror to bitbucket'
        uses: pixta-dev/repository-mirroring-action@v1
        with:
          target_repo_url:
            git@bitbucket.org:fscarmen/warp_unlock.git
          ssh_private_key:
            ${{ secrets.PRIVATE_KEY }}

  mirror_to_gitee:
    runs-on: ubuntu-latest
    steps:
      - name: 'Checkout'
        uses: actions/checkout@v1
      - name: 'Mirror to gitee'
        uses: pixta-dev/repository-mirroring-action@v1
        with:
          target_repo_url:
            git@gitee.com:fscarmen/warp_unlock.git
          ssh_private_key:
            ${{ secrets.PRIVATE_KEY }}

image

=========================================================================== When i updated the actions/checkout@v1 to actions/checkout@v3.3.0 and pixta-dev/repository-mirroring-action@v1 to pixta- dev/repository-mirroring-action@v1.1.1. The actions run fail.

name: 'GitHub Actions Mirror'

on:
  workflow_dispatch:
#  push:
#    branches: 
#      - master
  schedule:
    - cron: '20 20 * * *'

jobs:
  mirror_to_gitlab:
    runs-on: ubuntu-latest
    steps:
      - name: 'Checkout'
        uses: actions/checkout@v3.3.0
      - name: 'Mirror to gitlab'
        uses: pixta-dev/repository-mirroring-action@v1.1.1
        with:
          target_repo_url:
            git@gitlab.com:fscarmen/warp_unlock.git
          ssh_private_key:
            ${{ secrets.PRIVATE_KEY }}

  mirror_to_bitbucket:
    runs-on: ubuntu-latest
    steps:
      - name: 'Checkout'
        uses: actions/checkout@v3.3.0
      - name: 'Mirror to bitbucket'
        uses: pixta-dev/repository-mirroring-action@v1.1.1
        with:
          target_repo_url:
            git@bitbucket.org:fscarmen/warp_unlock.git
          ssh_private_key:
            ${{ secrets.PRIVATE_KEY }}

  mirror_to_gitee:
    runs-on: ubuntu-latest
    steps:
      - name: 'Checkout'
        uses: actions/checkout@v3.3.0
      - name: 'Mirror to gitee'
        uses: pixta-dev/repository-mirroring-action@v1.1.1
        with:
          target_repo_url:
            git@gitee.com:fscarmen/warp_unlock.git
          ssh_private_key:
            ${{ secrets.PRIVATE_KEY }}

image

yasaichi commented 1 year ago

@fscarmen Will you please try specify fetch-depth: 0 option to the checkout action? It could fix the error.

fscarmen commented 1 year ago

Will you please try specify fetch-depth: 0 option to the checkout action? It could fix the error.

I don't quite understand the meaning, how should I modify it?