-
Notifications
You must be signed in to change notification settings - Fork 12
62 lines (60 loc) · 1.65 KB
/
manual_war23.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# manual war update
name: manual war updates
on:
workflow_dispatch:
#schedule:
# - cron: '10-59/20 * * * *'
permissions: write-all
# contents: read
jobs:
alarms-fig:
runs-on: ubuntu-latest
environment: rockets
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install -r requirements_rockets.txt
- name: run idf deaths
run: |
python code/war23_idf_mem_all.py
python -W ignore code/war23_fronts_update.py
- name: run rocket alarms script
env:
OAuth: ${{ secrets.GOOMAP }}
cities_url: ${{ secrets.CITIES }}
run: |
python code/alarms3.py
python code/alarms_map_origin.py
python code/war23_distance.py
- name: run rocket 7 days script
env:
OAuth: ${{ secrets.GOOMAP }}
cities_url: ${{ secrets.CITIES }}
run: |
python code/alarms_week.py
- name: check news
run: |
git config --global user.name "actions"
git config --global user.email "actions@github"
if [ -n "$(git status --porcelain)" ]; then
echo "IS_NEW=true" >> $GITHUB_ENV
else
echo "no changes"
echo "IS_NEW=false" >> $GITHUB_ENV
fi
- name: commit files
run: |
git add -A
git commit -m "daily update"
git pull
if: ${{ env.IS_NEW == 'true' }}
- name: push files
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ env.IS_NEW == 'true' }}