Skip to content

Commit

Permalink
ci: code-format trigger others
Browse files Browse the repository at this point in the history
  • Loading branch information
YoloMao committed Sep 4, 2023
1 parent 7b331d9 commit 23e82cb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
repository_dispatch:
types: [ code-format-success ]

jobs:
build:
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/code_format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ name: Code Format

on:
pull_request:
paths:
- 'Growing*/**'
- 'Modules/**'
- 'Services/**'
- 'Package.swift'
branches: [ master ]
# paths:
# - 'Growing*/**'
# - 'Modules/**'
# - 'Services/**'
# - 'Package.swift'
# - 'SwiftPM-Wrap/**'

permissions:
contents: write
Expand All @@ -15,6 +17,7 @@ jobs:
code-format:
name: Code Format
runs-on: macos-latest
if: ${{ github.actor != 'GIOSDK' }} # 禁止套娃
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -60,4 +63,10 @@ jobs:
git config user.email [email protected]
git commit -am "style: code format"
git push origin ${{ github.head_ref }}
fi
fi
- name: trigger ci
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GIOSDK_PAT }}
event-type: code-format-success
4 changes: 2 additions & 2 deletions .github/workflows/spm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: SPM
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
repository_dispatch:
types: [ code-format-success ]

jobs:
autotracker-build-iOS:
Expand Down

0 comments on commit 23e82cb

Please sign in to comment.