Skip to content

Update force-sync-v1.yml #5

Update force-sync-v1.yml

Update force-sync-v1.yml #5

Workflow file for this run

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: Add Fork Repository
run: git remote add fork https://github.com/Zhang-Wei-666/mixte-v1.git
- name: Delete v1 Branch on Fork (if exists)
run: |
git push fork --delete v1 || echo "Branch v1 not found, skipping deletion"
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Force Push v1 Branch to Fork
run: |
git push fork v1 --force
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}