From be8fb5f18499ad2a33554eb33419ab8150dfff44 Mon Sep 17 00:00:00 2001 From: f18326186224 Date: Thu, 30 Nov 2023 03:24:10 +0800 Subject: [PATCH] fix: GITHUB_TOKEN->GH_TOKEN --- .github/workflows/update_api.yml | 1 + utils/github.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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