fix: caching for res-upd

This commit is contained in:
Constrat
2024-08-01 17:18:20 +02:00
parent 2e4809bb25
commit 4450e4f36c

View File

@@ -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: |