Skip to content

Commit c27e756

Browse files
authored
Merge pull request #5 from Wei18/feat/dependabot-commit
Feat: dependabot update code gen commit
2 parents fa3ed15 + 93fa88c commit c27e756

File tree

3 files changed

+37
-22
lines changed

3 files changed

+37
-22
lines changed

.github/workflows/CI.yml

-22
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,12 @@ on:
55
branches:
66
- main
77

8-
schedule:
9-
# 台灣的每隔 2 天的午夜 00:00 觸發
10-
- cron: '0 16 */2 * *'
11-
128
concurrency:
139
group: ${{ github.workflow }}-${{ github.ref }}
1410
cancel-in-progress: true
1511

1612
jobs:
1713

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-
3614
Test:
3715
strategy:
3816
matrix:

.github/workflows/Dependabot.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,14 @@ SWIFT_FILES := $(addsuffix /Client.swift, $(SUBDIRS))
4343
@echo "::debug:: make $@"
4444

4545
check-submodule: Submodule
46+
ifdef GITHUB_ACTIONS ## https://docs.github.com/en/actions/learn-github-actions/variables
47+
@echo "::notice:: make $@"
48+
else
4649
git submodule update --recursive --remote
4750
@git add $^
4851
@git commit -m "[Make]$$(git submodule status Submodule/github/rest-api-description)" && touch $^ || true
4952
@echo "::notice:: make $@"
53+
endif
5054

5155
install: check-submodule $(SWIFT_FILES)
5256
@echo "::notice:: make $@"

0 commit comments

Comments
 (0)