File tree 3 files changed +37
-22
lines changed
3 files changed +37
-22
lines changed Original file line number Diff line number Diff line change 5
5
branches :
6
6
- main
7
7
8
- schedule :
9
- # 台灣的每隔 2 天的午夜 00:00 觸發
10
- - cron : ' 0 16 */2 * *'
11
-
12
8
concurrency :
13
9
group : ${{ github.workflow }}-${{ github.ref }}
14
10
cancel-in-progress : true
15
11
16
12
jobs :
17
13
18
- Sync :
19
- strategy :
20
- matrix :
21
- os :
22
- - ubuntu-latest
23
- # - macos-latest
24
- swift : ["5.9"]
25
- runs-on : ${{ matrix.os }}
26
- steps :
27
- - uses : actions/checkout@v4
28
- with :
29
- submodules : true
30
- - uses : ./.github/workflows/actions/setup
31
- with :
32
- swift : ${{ matrix.swift }}
33
- os : ${{ matrix.os }}
34
- - run : make install
35
-
36
14
Test :
37
15
strategy :
38
16
matrix :
Original file line number Diff line number Diff line change
1
+
2
+ name : Dependabot update commit
3
+
4
+ on :
5
+ pull_request :
6
+ paths :
7
+ - ' Submodule/**'
8
+
9
+ jobs :
10
+
11
+ Sync :
12
+ if : github.actor == 'dependabot[bot]'
13
+ strategy :
14
+ matrix :
15
+ os :
16
+ - ubuntu-latest
17
+ # - macos-latest
18
+ swift : ["5.9"]
19
+ runs-on : ${{ matrix.os }}
20
+ steps :
21
+ - uses : actions/checkout@v4
22
+ with :
23
+ submodules : true
24
+ - uses : ./.github/workflows/actions/setup
25
+ with :
26
+ swift : ${{ matrix.swift }}
27
+ os : ${{ matrix.os }}
28
+ - run : |
29
+ git config user.name "${GITHUB_ACTOR}"
30
+ git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
31
+ - run : touch Submodule
32
+ - run : make install
33
+ - run : git push
Original file line number Diff line number Diff line change @@ -43,10 +43,14 @@ SWIFT_FILES := $(addsuffix /Client.swift, $(SUBDIRS))
43
43
@echo " ::debug:: make $@ "
44
44
45
45
check-submodule : Submodule
46
+ ifdef GITHUB_ACTIONS ## https ://docs.github.com/en/actions/learn-github-actions/variables
47
+ @echo " ::notice:: make $@ "
48
+ else
46
49
git submodule update --recursive --remote
47
50
@git add $^
48
51
@git commit -m "[Make]$$(git submodule status Submodule/github/rest-api-description)" && touch $^ || true
49
52
@echo "::notice:: make $@"
53
+ endif
50
54
51
55
install : check-submodule $(SWIFT_FILES )
52
56
@echo " ::notice:: make $@ "
You can’t perform that action at this time.
0 commit comments