logicdn 1.0.759 → 1.0.760

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,8 +36,8 @@ jobs:
36
36
  id: cached-poetry-dependencies
37
37
  uses: actions/cache@v3
38
38
  with:
39
- path: .venv
40
- key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
39
+ path: logi.im/api/.venv
40
+ key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('logi.im/api/poetry.lock') }}
41
41
 
42
42
  - name: Install python dependencies
43
43
  if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
@@ -51,10 +51,10 @@ jobs:
51
51
  node-version: 14
52
52
  registry-url: https://registry.npmjs.org/
53
53
 
54
- - name: Generate data
55
- run: |
56
- cd logi.im/api
57
- poetry run python index.py
54
+ # - name: Generate data
55
+ # run: |
56
+ # cd logi.im/api
57
+ # poetry run python index.py
58
58
 
59
59
  - name: Update version
60
60
  run: node --experimental-modules index.mjs
@@ -0,0 +1,79 @@
1
+ name: Daily Update
2
+
3
+ env:
4
+ TZ: Asia/Shanghai
5
+
6
+ on:
7
+ workflow_dispatch:
8
+ schedule:
9
+ - cron: "30 19 * * *"
10
+
11
+ jobs:
12
+ update:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v3
18
+ with:
19
+ ref: master
20
+
21
+ - name: Set python
22
+ id: setup-python
23
+ uses: actions/setup-python@v4
24
+ with:
25
+ python-version: '3.10'
26
+
27
+ - name: Install poetry
28
+ uses: snok/install-poetry@v1
29
+ with:
30
+ version: 1.1.15
31
+ virtualenvs-create: true
32
+ virtualenvs-in-project: true
33
+ installer-parallel: true
34
+
35
+ - name: Load cached venv
36
+ id: cached-poetry-dependencies
37
+ uses: actions/cache@v3
38
+ with:
39
+ path: logi.im/api/.venv
40
+ key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('logi.im/api/poetry.lock') }}
41
+
42
+ - name: Install python dependencies
43
+ if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
44
+ run: |
45
+ cd logi.im/api
46
+ poetry install --no-interaction --no-root --no-dev
47
+
48
+ - name: Setup node
49
+ uses: actions/setup-node@v1
50
+ with:
51
+ node-version: 14
52
+ registry-url: https://registry.npmjs.org/
53
+
54
+ - name: Generate data
55
+ run: |
56
+ cd logi.im/api
57
+ poetry run python index.py
58
+
59
+ # - name: Update version
60
+ # run: node --experimental-modules index.mjs
61
+
62
+ - name: Commit files
63
+ run: |
64
+ git config --local user.email "action@github.com"
65
+ git config --local user.name "GitHub Action"
66
+ git commit -am "Update api data"
67
+ git push origin master
68
+
69
+ # - name: Publish package
70
+ # run: |
71
+ # npm version patch
72
+ # npm publish
73
+ # env:
74
+ # NODE_AUTH_TOKEN: ${{secrets.npm_token}}
75
+
76
+ # - name: Refresh cdn
77
+ # run: |
78
+ # cd logi.im/api
79
+ # poetry run python index.py r