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 0a723d4 commit 75e98fd
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/push-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
with:
fetch-depth: 3

- name: Detect changes in version file
id: changes
uses: dorny/paths-filter@v2
with:
filters: |
version:
- 'Data/version'
# - name: Detect changes in version file
# id: changes
# uses: dorny/paths-filter@v2
# with:
# filters: |
# version:
# - 'Data/version'

- name: Setup Python
uses: actions/setup-python@v4
Expand All @@ -44,6 +44,7 @@ jobs:
OSS_ACCESS_KEY_SECRET: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
OSS_BUCKET_NAME: ${{ secrets.OSS_BUCKET_NAME }}
OSS_ENDPOINT: ${{ secrets.OSS_ENDPOINT }}
FORCE_UPLOAD: ${{ github.event.inputs.force_upload }}
run: |
import os
import json
Expand All @@ -63,11 +64,12 @@ jobs:
return None
raise
with open('Data/version', 'r') as f:
try:
current_version = force_upload
except:
force_upload = os.environ['FORCE_UPLOAD']
print(f"force_upload: {force_upload}")
if force_upload == "true":
current_version = {"program": "latest", "data": "latest"}
else:
with open('Data/version', 'r') as f:
current_version = json.load(f)
previous_version = get_previous_version()
Expand Down

0 comments on commit 75e98fd

Please sign in to comment.