.github/workflows/run.yaml #6938
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
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 0/4 * * *' | |
workflow_dispatch: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo content | |
uses: actions/checkout@v4 # checkout the repository content | |
- name: setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' # install the python version needed | |
cache: pip | |
- name: install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: execute py script # run main.py | |
env: | |
API_KEY: ${{ secrets.RADARIO_API_KEY }} | |
run: python main.py | |
- name: push data files | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email "actions@github.com" | |
if [ -n "$(git status --porcelain)" ]; then | |
git add . | |
git commit -m "Update Documentation" | |
git push | |
else | |
echo "no changes"; | |
fi |