2023-12-16 16:12:19 +08:00
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: "0,20,40 * * * *"
|
|
|
|
workflow_dispatch:
|
|
|
|
|
2023-12-16 16:53:13 +08:00
|
|
|
permissions: write-all
|
2023-12-16 16:12:19 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
pull_remote:
|
|
|
|
name: mirror shenjack.top
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: just checkout
|
|
|
|
uses: actions/checkout@v4
|
2023-12-16 16:53:13 +08:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.WORK_TOKEN }}
|
2023-12-16 16:12:19 +08:00
|
|
|
|
2023-12-16 16:58:06 +08:00
|
|
|
- name: set git config
|
2023-12-16 16:12:19 +08:00
|
|
|
run: |
|
|
|
|
git config --global user.email 3695888@qq.com
|
|
|
|
git config --global user.name shenjack-action
|
2023-12-16 16:58:06 +08:00
|
|
|
|
|
|
|
- name: add remote repository
|
|
|
|
run: |
|
2023-12-16 16:12:19 +08:00
|
|
|
git remote add gitea http://shenjack.top:5100/ARS/ars-tools.git
|
2023-12-16 16:58:06 +08:00
|
|
|
|
|
|
|
- name: fetch from remote
|
|
|
|
run: |
|
|
|
|
git fetch gitea '*:*'
|
|
|
|
|
|
|
|
- name: push to origin
|
|
|
|
run: |
|
2023-12-16 16:53:13 +08:00
|
|
|
git push origin --mirror
|