diff --git a/.github/workflows/update_api.yml b/.github/workflows/update_api.yml index 4b45dd5..acb15eb 100644 --- a/.github/workflows/update_api.yml +++ b/.github/workflows/update_api.yml @@ -8,6 +8,7 @@ jobs: update_api_data: runs-on: ubuntu-latest # 如果type为api_add,则执行以下步骤 + if: github.event.client_payload.type == 'api_add' permissions: contents: write steps: diff --git a/utils/github.py b/utils/github.py index a485346..c517b1f 100644 --- a/utils/github.py +++ b/utils/github.py @@ -2,7 +2,7 @@ import requests import os -GH_TOKEN = os.environ.get('GITHUB_TOKEN') +GH_TOKEN = os.environ.get('GH_TOKEN') def trigger_github_workflow(event_type: str, client_payload: dict = {}): """触发github workflow