🐛 QD-12483 fix .idea cache sync for native mode (#718) #176
Workflow file for this run
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 | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| packages: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - '2*' | |
| tags: | |
| - '*' | |
| jobs: | |
| mirror: | |
| if: github.repository == 'jetbrains/qodana-cli' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout full history | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| fetch-tags: true | |
| - name: Push origin/main and origin/2* to mirror | |
| env: | |
| MR_PAT: ${{ secrets.MR_PAT }} | |
| run: | | |
| git remote add mirror https://x-access-token:${MR_PAT}@github.com/jetbrains/qodana-cli-ci.git | |
| git push --force mirror origin/main:refs/heads/main | |
| for R in $(git for-each-ref --format='%(refname:short)' refs/remotes/origin/2*); do | |
| BR=${R#origin/} | |
| git push --force mirror "origin/${BR}:refs/heads/${BR}" | |
| done | |
| git push --force mirror --tags |