From 341091c3379b23c5f42057dbc1fdca429120997c Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Fri, 17 Nov 2023 19:49:55 +0800 Subject: [PATCH] action: remove code about android branches --- .../workflows/android-branch-auto-sync.yml | 69 ------------------- .github/workflows/trigger-cmfa-update.yml | 33 +++++++++ 2 files changed, 33 insertions(+), 69 deletions(-) delete mode 100644 .github/workflows/android-branch-auto-sync.yml create mode 100644 .github/workflows/trigger-cmfa-update.yml diff --git a/.github/workflows/android-branch-auto-sync.yml b/.github/workflows/android-branch-auto-sync.yml deleted file mode 100644 index fd7c9d66..00000000 --- a/.github/workflows/android-branch-auto-sync.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Android Branch Auto Sync -on: - workflow_dispatch: - push: - paths-ignore: - - "docs/**" - - "README.md" - - ".github/ISSUE_TEMPLATE/**" - branches: - - Alpha - - android-open - tags: - - "v*" - pull_request_target: - branches: - - Alpha - - android-open - -jobs: - update-dependencies: - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Configure Git - run: | - git config --global user.name 'GitHub Action' - git config --global user.email 'action@github.com' - - - name: Sync android-real with Alpha rebase android-open - run: | - git fetch origin - git checkout origin/Alpha -b android-real - git merge --squash origin/android-open - git commit -m "Android: patch" - - - name: Check for conflicts - run: | - CONFLICTS=$(git diff --name-only --diff-filter=U) - if [ ! -z "$CONFLICTS" ]; then - echo "There are conflicts in the following files:" - echo $CONFLICTS - exit 1 - fi - - - name: Push changes - run: | - git push origin android-real --force - - # Send "core-updated" to MetaCubeX/MihomoForAndroid to trigger update-dependencies - trigger-MFA-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/MihomoForAndroid/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/trigger-cmfa-update.yml b/.github/workflows/trigger-cmfa-update.yml new file mode 100644 index 00000000..d767657e --- /dev/null +++ b/.github/workflows/trigger-cmfa-update.yml @@ -0,0 +1,33 @@ +name: Trigger CMFA Update +on: + workflow_dispatch: + push: + paths-ignore: + - "docs/**" + - "README.md" + - ".github/ISSUE_TEMPLATE/**" + branches: + - Alpha + tags: + - "v*" + pull_request_target: + branches: + - Alpha + +jobs: + # Send "core-updated" to MetaCubeX/MihomoForAndroid to trigger update-dependencies + trigger-CMFA-update: + 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/MihomoForAndroid/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