Update ci.yml #9
This file contains 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: Force Sync v1 Branch to Fork | |
on: | |
push: | |
branches: | |
- v1 | |
jobs: | |
sync: | |
if: github.repository == 'MoomFE/mixte' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: v1 | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Set up Git | |
run: | | |
git config --global user.name 'Zhang-Wei-666' | |
git config --global user.email '994039348@qq.com' | |
- name: Fetch Fork Repository | |
run: | | |
git remote add fork https://github.com/Zhang-Wei-666/mixte-v1.git | |
git fetch fork | |
- name: Reset Fork Branch to Source | |
run: | | |
git checkout v1 | |
git reset --hard origin/v1 | |
git push fork v1 --force | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |