File tree Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Expand file tree Collapse file tree 3 files changed +13
-9
lines changed Original file line number Diff line number Diff line change 63
63
- name : Upload artifact
64
64
uses : actions/upload-artifact@v4
65
65
with :
66
- name : latest_update
67
- path : ./latest_update .json
66
+ name : full_update_info
67
+ path : ./full_update_info .json
68
68
69
69
create-issue :
70
70
needs : check-for-updates
@@ -75,11 +75,11 @@ jobs:
75
75
- name : Download artifact
76
76
uses : actions/download-artifact@v4
77
77
with :
78
- name : latest_update
78
+ name : full_update_info
79
79
80
80
- name : Get data from json
81
81
id : get_data
82
- run : echo "json_data=$(cat latest_update .json)" >> $GITHUB_OUTPUT
82
+ run : echo "json_data=$(cat full_update_info .json)" >> $GITHUB_OUTPUT
83
83
84
84
- name : Print data
85
85
run : |
Original file line number Diff line number Diff line change 8
8
9
9
# Virtual environments
10
10
.venv
11
+
12
+ full_update_info.json
Original file line number Diff line number Diff line change 9
9
df_app_id = 975370
10
10
11
11
root_dir = Path (__file__ ).parent
12
- output_file = root_dir / "latest_update.json"
12
+ latest_update_file = root_dir / "latest_update.json"
13
+ full_update_info_file = root_dir / "full_update_info.json"
13
14
14
15
15
16
def get_last_posts (* , count ) -> list [dict [str , Any ]]:
@@ -32,17 +33,18 @@ def main():
32
33
posts = get_last_posts (count = 1 )
33
34
post = posts [0 ]
34
35
35
- if output_file .exists ():
36
- prev_update = json .loads (output_file .read_text (encoding = "utf-8" ))
36
+ if latest_update_file .exists ():
37
+ prev_update = json .loads (latest_update_file .read_text (encoding = "utf-8" ))
37
38
38
- if is_update (post ["title" ]) and (not output_file .exists () or prev_update ["date" ] < post ["date" ]):
39
+ if is_update (post ["title" ]) and (not latest_update_file .exists () or prev_update ["date" ] < post ["date" ]):
39
40
prev_update = dict (
40
41
gid = post ["gid" ],
41
42
date = post ["date" ],
42
43
title = post ["title" ],
43
44
appid = post ["appid" ],
44
45
)
45
- output_file .write_text (json .dumps (prev_update ), encoding = "utf-8" )
46
+ latest_update_file .write_text (json .dumps (prev_update ), encoding = "utf-8" )
47
+ full_update_info_file .write_text (json .dumps (post ), encoding = "utf-8" )
46
48
print ("yes" )
47
49
else :
48
50
print ("no" )
You can’t perform that action at this time.
0 commit comments