mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
fix: caching for res-upd
This commit is contained in:
16
.github/workflows/res-update-game.yml
vendored
16
.github/workflows/res-update-game.yml
vendored
@@ -234,11 +234,11 @@ jobs:
|
||||
id: cache_python
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ env.pythonLocation }}/lib/python3.11/site-packages
|
||||
path: ${{ env.pythonLocation }}/Lib/site-packages
|
||||
key: ${{ runner.os }}-pip-optimize-templates-${{ hashFiles('./tools/OptimizeTemplates/requirements.txt') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.check_sorted_templates.outputs.contains_png == 'True' && steps.cache_python.outputs.cache-hit != 'true'
|
||||
if: steps.cache_python.outputs.cache-hit != 'true' && steps.check_sorted_templates.outputs.contains_png == 'True'
|
||||
run: |
|
||||
pip install -r tools/OptimizeTemplates/requirements.txt
|
||||
|
||||
@@ -253,10 +253,6 @@ jobs:
|
||||
run: |
|
||||
python3 tools/OptimizeTemplates/optimize_templates.py -p resource/template/items/ resource/template/infrast/
|
||||
|
||||
- name: Cancelling
|
||||
if: steps.check_sorted_templates.outputs.changes != 'True'
|
||||
uses: andymckay/cancel-action@0.5
|
||||
|
||||
- name: Add files to git
|
||||
if: steps.check_sorted_templates.outputs.changes == 'True'
|
||||
id: add_files
|
||||
@@ -278,10 +274,6 @@ jobs:
|
||||
|
||||
git pull origin $(git rev-parse --abbrev-ref HEAD) --unshallow --rebase
|
||||
|
||||
- name: Cancelling
|
||||
if: steps.add_files.outputs.have_commits != 'True'
|
||||
uses: andymckay/cancel-action@0.5
|
||||
|
||||
- name: Push changes
|
||||
if: steps.add_files.outputs.have_commits == 'True'
|
||||
uses: ad-m/github-push-action@master
|
||||
@@ -295,6 +287,10 @@ jobs:
|
||||
run: |
|
||||
gh workflow --repo MaaAssistantArknights/MaaRelease run update-resource.yml
|
||||
|
||||
- name: Add cancelled status
|
||||
if: steps.check_sorted_templates.outputs.changes != 'True' || steps.add_files.outputs.have_commits != 'True'
|
||||
uses: andymckay/cancel-action@0.5
|
||||
|
||||
# - name: Release # ref: https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
|
||||
# if: steps.add_files.outputs.have_commits == 'True'
|
||||
# run: |
|
||||
|
||||
Reference in New Issue
Block a user