war updates 25 #362
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: war updates 25 | |
on: | |
schedule: | |
#- cron: '10-59/20 * * * *' | |
- cron: '20 * * * *' | |
permissions: write-all | |
# contents: read | |
jobs: | |
wartime-updates-25: | |
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 rocket alarms script | |
env: | |
OAuth: ${{ secrets.GOOMAP }} | |
cities_url: ${{ secrets.CITIES }} | |
hist_url: ${{ secrets.HIST }} | |
run: | | |
python -W ignore code/alarms3.py | |
python -W ignore code/alarms_map_origin.py | |
- name: run war media | |
run: | | |
python -W ignore code/war23_ynetlist.py | |
python -W ignore code/war23_haaretz_deaths.py | |
python -W ignore code/war23_haaretz_kidnapped.py | |
- name: run idf deaths | |
run: | | |
python -W ignore code/war23_idf_mem_all.py | |
python -W ignore code/war23_fronts_update.py | |
python -W ignore code/war23_deaths_haa_plus.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' }} |