Create main.yml #1
This file contains hidden or 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: Mirror Repo | |
| on: | |
| push: | |
| branches: | |
| - main # 필요 브랜치만 트리거 | |
| permissions: | |
| contents: read | |
| jobs: | |
| mirror: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 # mirror 위해 전체 히스토리 필요 | |
| - name: Push mirror | |
| env: | |
| MIRROR_URL: https://<PAT>@github.com/loopers-dongbanza/junho-algo.git | |
| run: | | |
| git remote add mirror "$MIRROR_URL" | |
| git push --mirror mirror |