From 23e82cb2c2588e595fd41f94d871cb6215ff6950 Mon Sep 17 00:00:00 2001 From: YoloMao Date: Mon, 4 Sep 2023 16:58:48 +0800 Subject: [PATCH] ci: code-format trigger others --- .github/workflows/ci.yml | 4 ++-- .github/workflows/code_format.yml | 21 +++++++++++++++------ .github/workflows/spm.yml | 4 ++-- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 911f0c85e..7c29b52f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,8 +3,8 @@ name: CI on: push: branches: [ master ] - pull_request: - branches: [ master ] + repository_dispatch: + types: [ code-format-success ] jobs: build: diff --git a/.github/workflows/code_format.yml b/.github/workflows/code_format.yml index db68a34a0..270f53a01 100644 --- a/.github/workflows/code_format.yml +++ b/.github/workflows/code_format.yml @@ -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 @@ -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 @@ -60,4 +63,10 @@ jobs: git config user.email sdk-integration@growingio.com git commit -am "style: code format" git push origin ${{ github.head_ref }} - fi \ No newline at end of file + fi + + - name: trigger ci + uses: peter-evans/repository-dispatch@v2 + with: + token: ${{ secrets.GIOSDK_PAT }} + event-type: code-format-success diff --git a/.github/workflows/spm.yml b/.github/workflows/spm.yml index 4c609088f..35a87f58b 100644 --- a/.github/workflows/spm.yml +++ b/.github/workflows/spm.yml @@ -3,8 +3,8 @@ name: SPM on: push: branches: [ master ] - pull_request: - branches: [ master ] + repository_dispatch: + types: [ code-format-success ] jobs: autotracker-build-iOS: