camelcase logging #315
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 to GitLab | |
| on: | |
| push: | |
| branches: ["**"] | |
| tags: ["**"] | |
| jobs: | |
| mirror: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - https://github.com/actions/checkout/releases/tag/v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| persist-credentials: false | |
| - name: Mirror to GitLab | |
| run: | | |
| git remote add gitlab "https://oauth2:${GITLAB_TOKEN}@${GITLAB_HOST}/${GITLAB_REPO}.git" | |
| # Avoid --mirror, which also pushes refs/remotes/* that GitLab rejects as hidden refs. | |
| # Push from refs/remotes/origin/* so all branches are present and --prune never deletes the default branch. | |
| git push --prune gitlab 'refs/remotes/origin/*:refs/heads/*' | |
| git push --force gitlab 'refs/tags/*:refs/tags/*' | |
| env: | |
| GITLAB_TOKEN: ${{ secrets.GITLAB_MIRROR_TOKEN }} | |
| GITLAB_HOST: ${{ vars.GITLAB_HOST }} | |
| GITLAB_REPO: ${{ vars.GITLAB_REPO }} |