-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (25 loc) · 790 Bytes
/
sync.yml
File metadata and controls
29 lines (25 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Sync Repository
on:
push:
branches:
- main
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Sync Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT }}
fetch-depth: 0
- name: Mirror Repository
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
rm -rf .github/workflows
git add -A
git commit -m "Synced successfully" || echo "No changes to commit"
git remote add mirror https://x-access-token:${{ secrets.GH_PAT }}@github.com/vickyy234/spark.git
git fetch mirror main
git push mirror main --force