Comparaison lab (#118) #108
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 all branches to org repo | |
| on: | |
| push: | |
| branches: | |
| - '**' | |
| jobs: | |
| mirror: | |
| runs-on: ubuntu-latest | |
| environment: token | |
| steps: | |
| - name: Checkout all branches | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Add mirror remote and push | |
| run: | | |
| REMOTE_URL="https://x-access-token:${{ secrets.ACCESS_TOKEN }}@github.com/EpitechPromo2026/G-EIP-700-RUN-7-1-eip-lucas.arnassalom.git" | |
| echo "Ajout du remote mirror..." | |
| git remote add mirror "$REMOTE_URL" | |
| echo "Liste des remotes :" | |
| git remote -v | |
| echo "Push des branches..." | |
| git push mirror --all | |
| echo "Push des tags..." | |
| git push mirror --tags |