From 20bf349e4e3343d3b8204cc3c6c8a5c6ecaba4b7 Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Sat, 8 Apr 2023 00:18:00 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20cmdpriv=E6=A8=A1=E6=9D=BF=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/update-cmdpriv-template.yml | 4 ++-- res/scripts/generate_cmdpriv_template.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update-cmdpriv-template.yml b/.github/workflows/update-cmdpriv-template.yml index dde400e7..04862f3b 100644 --- a/.github/workflows/update-cmdpriv-template.yml +++ b/.github/workflows/update-cmdpriv-template.yml @@ -42,7 +42,7 @@ jobs: - name: Check for changes in cmdpriv-template.json id: check_changes run: | - if git diff --name-only | grep -q "cmdpriv-template.json"; then + if git diff --name-only | grep -q "res/templates/cmdpriv-template.json"; then echo "::set-output name=changes_detected::true" else echo "::set-output name=changes_detected::false" @@ -53,6 +53,6 @@ jobs: run: | git config --global user.name "GitHub Actions Bot" git config --global user.email "" - git add cmdpriv-template.json + git add res/templates/cmdpriv-template.json git commit -m "Update cmdpriv-template.json" git push diff --git a/res/scripts/generate_cmdpriv_template.py b/res/scripts/generate_cmdpriv_template.py index a8de3efe..f76f3c24 100644 --- a/res/scripts/generate_cmdpriv_template.py +++ b/res/scripts/generate_cmdpriv_template.py @@ -13,5 +13,5 @@ for key in cmdsmgr.__command_list__: template[key] = cmdsmgr.__command_list__[key]['privilege'] # 写入cmdpriv-template.json -with open('cmdpriv-template.json', 'w') as f: +with open('res/templates/cmdpriv-template.json', 'w') as f: f.write(json.dumps(template, indent=4, ensure_ascii=False)) \ No newline at end of file