Skip to content

Feat: dependabot update code gen commit #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,12 @@ on:
branches:
- main

schedule:
# 台灣的每隔 2 天的午夜 00:00 觸發
- cron: '0 16 */2 * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:

Sync:
strategy:
matrix:
os:
- ubuntu-latest
# - macos-latest
swift: ["5.9"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/actions/setup
with:
swift: ${{ matrix.swift }}
os: ${{ matrix.os }}
- run: make install

Test:
strategy:
matrix:
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/Dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

name: Dependabot update commit

on:
pull_request:
paths:
- 'Submodule/**'

jobs:

Sync:
if: github.actor == 'dependabot[bot]'
strategy:
matrix:
os:
- ubuntu-latest
# - macos-latest
swift: ["5.9"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: ./.github/workflows/actions/setup
with:
swift: ${{ matrix.swift }}
os: ${{ matrix.os }}
- run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- run: touch Submodule
- run: make install
- run: git push
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,14 @@ SWIFT_FILES := $(addsuffix /Client.swift, $(SUBDIRS))
@echo "::debug:: make $@"

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

install: check-submodule $(SWIFT_FILES)
@echo "::notice:: make $@"
Expand Down