🎭🔃♾️[Gitee Sync] - vide coding / Use shared AI instruction files across multiple repositories #462
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: Gitee Sync | |
| run-name: "🎭🔃♾️[${{ github.workflow }}] - ${{ github.event.head_commit.message }}" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow}} | |
| cancel-in-progress: true | |
| env: | |
| GITEE_REPOSITORY: copdips/copdips.github.io | |
| jobs: | |
| sync_to_gitee: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # - name: sync-gitee-mirror | |
| # uses: abersheeran/sync-gitee-mirror@v1-beta | |
| # # https://github.com/abersheeran/sync-gitee-mirror | |
| # with: | |
| # repository: ${{ env.GITEE_REPOSITORY }} | |
| # username: ${{ vars.GITEE_USERNAME }} | |
| # password: ${{ secrets.GITEE_PAT }} | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - run: | | |
| remote_repo="https://${{ vars.GITEE_USERNAME }}:${{ secrets.GITEE_PAT }}@gitee.com/${{ env.GITEE_REPOSITORY }}.git" | |
| git remote add gitee "${remote_repo}" | |
| branch=$(git branch --show-current) | |
| git push gitee $branch -f |