-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
35 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,37 +2,50 @@ name: Auto Check and Update Patch Data | |
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
Patch_version: | ||
description: 'Please input the version of FF14 Patch' | ||
required: true | ||
schedule: | ||
- cron: '0 15 * * 2' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
# 指定要检出的仓库,默认为当前仓库 | ||
repository: thewakingsands/ffxiv-datamining-cn | ||
# 指定要检出的分支,默认为默认分支 | ||
ref: master | ||
|
||
- name: List files in the repository | ||
run: git tag --list 'patch-.*' | ||
|
||
- name: Setup Python | ||
if: steps.changes.outputs.version == 'true' | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Check FFXIX CN Patch Code Version | ||
id: check_version | ||
run: | | ||
output=$(git ls-remote https://github.com/thewakingsands/ffxiv-datamining-cn |grep "patch" |awk -F "-" '{print $2}'| tail -1) | ||
echo "::set-output name=patch_version::$output" | ||
- name: Install dependencies | ||
if: steps.changes.outputs.version == 'true' | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install requests | ||
- name: Run Python script | ||
run: | | ||
python format_item.py | ||
path: ./Paissa/Data | ||
env: | ||
FFXIV_PATCH_VERSION: {{step.check_version.outputs.patch_version}} | ||
|
||
- 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 changes | ||
run: | | ||
git push | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GIT_KEY }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters