forked from Hyy2001X/AutoBuild-Actions-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 1.01 KB
/
Copy pathModule-Synchronise_Forks.yml
File metadata and controls
35 lines (29 loc) · 1.01 KB
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
30
31
32
33
34
35
############################################################
# Description: GitHub Action to Synchronise Forks #
# Based on: danshui-git/github-forks-sync-action.git #
# Modify: Hyy2001X #
# Thanks to: https://github.com/281677160 #
############################################################
name: Synchronise Forks
on:
repository_dispatch:
workflow_dispatch:
inputs:
sync_mode:
description: '同步上游所有内容'
default: 'false'
env:
SCRIPT_FILE: Scripts/Sync.sh
jobs:
Job:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Run Synchronise Script
run: |
[ "${{github.event.inputs.sync_mode}}" == true ] && {
bash $GITHUB_WORKSPACE/Scripts/Sync.sh ${{secrets.GITHUB_TOKEN}} ${{github.repository}} --sync-all
} || {
bash $GITHUB_WORKSPACE/Scripts/Sync.sh ${{secrets.GITHUB_TOKEN}} ${{github.repository}}
}