Skip to content

Commit

Permalink
Adjustments for GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
m417z committed Nov 22, 2020
1 parent 75da74d commit 3fd59b2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Winbindex Periodic Update

on: workflow_dispatch
on:
workflow_dispatch:
schedule:
- cron: '0 7 * * *'

jobs:
update:
Expand Down
23 changes: 15 additions & 8 deletions data/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ def run_deploy():
print('Running upd03_parse_manifests')
upd03_parse_manifests()

time_to_stop = start_time + timedelta(minutes=46)
#time_to_stop = start_time + timedelta(minutes=46) # For Travis
time_to_stop = None

print('Running upd05_group_by_filename')
upd05_group_by_filename(progress_state, time_to_stop)
Expand Down Expand Up @@ -298,15 +299,21 @@ def main():
print('can_deploy() returned False, exiting')
return

pr_title = run_deploy()
if not pr_title:
print('run_deploy() returned False, exiting')
return
while True:
pr_title = run_deploy()
if not pr_title:
print('run_deploy() returned False, exiting')
return

build_html_index_of_hashes()

build_html_index_of_hashes()
commit_deploy(pr_title)

commit_deploy(pr_title)
print('Done')
# Stop once we got files from VirusTotal.
# Otherwise, continue as long as there are new updates.
if pr_title.endswith('files from VirusTotal'):
print('Done')
return

if __name__ == '__main__':
main()

0 comments on commit 3fd59b2

Please sign in to comment.