main and test package names do not match, fix expilicitly with annota… #7
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: Sync to GitLab | |
| on: | |
| push: | |
| branches: | |
| - main # Make sure this matches your branch name (main or master) | |
| jobs: | |
| sync: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Mirror to GitLab | |
| env: | |
| GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} | |
| GITLAB_REPO_URL: ${{ secrets.GITLAB_REPO_URL }} | |
| run: | | |
| # Strip 'https://' from the URL manually | |
| CLEAN_URL=$(echo $GITLAB_REPO_URL | sed 's|https://||') | |
| # Add the remote using the token for authentication | |
| git remote add gitlab https://oauth2:${GITLAB_TOKEN}@${CLEAN_URL} | |
| # Push everything to GitLab | |
| git push --force --prune gitlab +refs/remotes/origin/*:refs/heads/* +refs/tags/*:refs/tags/* |