删除 .github/workflows/sync-from-gitea.yaml

This commit is contained in:
xiaochou164 2025-06-03 15:49:11 +00:00
parent d238775b29
commit 95b4fff5c5
1 changed files with 0 additions and 37 deletions

View File

@ -1,37 +0,0 @@
name: Sync Gitea to GitHub (HTTPS)
on:
schedule:
- cron: '*/10 * * * *' # 每 10 分钟执行一次
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout GitHub repo
uses: actions/checkout@v3
with:
ref: main # 你要同步的分支
- name: Set up Git
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- name: Add Gitea as remote (HTTPS)
run: |
# 添加 Gitea 为远程仓库,使用 HTTPS
git remote add gitea https://${{ secrets.GITEA_USER }}:${{ secrets.GITEA_PASSWORD }}@git.sundays.ink/xiaochou164/clash_rule.git
- name: Fetch from Gitea
run: git fetch gitea
- name: Reset to Gitea's main branch
run: git reset --hard gitea/main
- name: Push to GitHub
run: |
# 替换为你的 GitHub 用户名和仓库名
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_ACCESS_TOKEN }}@github.com/xiaochou164/clash_rule.git
git push origin main --force