From ef303b11f21edb3716865a5b5f7c00faf152874b Mon Sep 17 00:00:00 2001 From: Steve Johnson Date: Thu, 2 Nov 2023 16:01:35 +0800 Subject: [PATCH] action: trigger CMFA PR update in every commit --- .../workflows/android-branch-auto-sync.yml | 20 ++++++++++++- .../workflows/cmfa-update-deps-trigger.yml | 28 ------------------- 2 files changed, 19 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/cmfa-update-deps-trigger.yml diff --git a/.github/workflows/android-branch-auto-sync.yml b/.github/workflows/android-branch-auto-sync.yml index 5dbbd5be..c7ee5eba 100644 --- a/.github/workflows/android-branch-auto-sync.yml +++ b/.github/workflows/android-branch-auto-sync.yml @@ -48,4 +48,22 @@ jobs: - name: Push changes run: | - git push origin android-real --force \ No newline at end of file + git push origin android-real --force + + # Send "core-updated" to MetaCubeX/ClashMetaForAndroid to trigger update-dependencies + trigger-CMFA-update: + needs: update-dependencies + runs-on: ubuntu-latest + steps: + - uses: tibdex/github-app-token@v1 + id: generate-token + with: + app_id: ${{ secrets.MAINTAINER_APPID }} + private_key: ${{ secrets.MAINTAINER_APP_PRIVATE_KEY }} + + - name: Trigger update-dependencies + run: | + curl -X POST https://api.github.com/repos/MetaCubeX/ClashMetaForAndroid/dispatches \ + -H "Accept: application/vnd.github.everest-preview+json" \ + -H "Authorization: token ${{ steps.generate-token.outputs.token }}" \ + -d '{"event_type": "core-updated"}' \ No newline at end of file diff --git a/.github/workflows/cmfa-update-deps-trigger.yml b/.github/workflows/cmfa-update-deps-trigger.yml deleted file mode 100644 index 549b0098..00000000 --- a/.github/workflows/cmfa-update-deps-trigger.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: CMFA auto update-dependencies trigger -on: - workflow_dispatch: - push: - tags: - - "*" - pull_request_target: - branches: - - Alpha - -jobs: - update-dependencies: - runs-on: ubuntu-latest - steps: - - uses: tibdex/github-app-token@v1 - id: generate-token - with: - app_id: ${{ secrets.MAINTAINER_APPID }} - private_key: ${{ secrets.MAINTAINER_APP_PRIVATE_KEY }} - - - name: Trigger update-dependencies - run: | - curl -X POST https://api.github.com/repos/MetaCubeX/ClashMetaForAndroid/dispatches \ - -H "Accept: application/vnd.github.everest-preview+json" \ - -H "Authorization: token ${{ steps.generate-token.outputs.token }}" \ - -d '{"event_type": "core-updated"}' - # Send "core-updated" to MetaCubeX/ClashMetaForAndroid to trigger update-dependencies -