Skip to content

Commit

Permalink
测试action
Browse files Browse the repository at this point in the history
  • Loading branch information
NagaResst committed Nov 23, 2024
1 parent a3cd395 commit 31d3464
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/auto-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,6 @@ jobs:
python format_item.py
working-directory: Data

- name: Configure Git user
run: |
git config --global user.name 'Naga Resst'
git config --global user.email '[email protected]'
- name: Add and commit changes
run: |
git add .
git commit -m 'Update Patch Data'
- name: Push Code to Repo
uses: devops-infra/action-commit-push@master
with:
Expand Down
6 changes: 6 additions & 0 deletions Data/format_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,10 @@ def get_item_details(item_id):

with open('item.Pdt', 'w', encoding='utf8') as item_data:
json.dump(version, item_data)

with open('version', 'rw', encoding='utf8') as version_file:
data_version = json.load(version_file)
data_version.update({"data": patch_version})
json.dump(data_version, version_file)

logging.info('数据写入完毕')

0 comments on commit 31d3464

Please sign in to comment.