Skip to content

Sync Fork

Sync Fork #1

Workflow file for this run

name: Sync Repository
on:
schedule:
- cron: '0 0 * * *' # 每天午夜执行
workflow_dispatch: # 允许手动触发
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
repository: ansoncloud8/am-cf-linklet
token: ${{ secrets.GITHUB_TOKEN }}
path: temp-repo
- name: Sync repository
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
cd temp-repo
git remote add target https://github.com/amclubs/am-cf-linklet.git
git fetch target
git push target master --force
- name: Clean up
run: rm -rf temp-repo