Run Python Templates #9
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: Run Python Templates | |
on: | |
schedule: | |
# Run every weekday at 8:00 AM UTC | |
- cron: '0 8 * * 1-5' | |
jobs: | |
run-python-plugin-scripts: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Set up Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
# Install tofupilot package | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tofupilot | |
# Set TOFUPILOT_API_KEY and run all Python files in corresponding folder | |
- name: Run Climatic Chamber scripts | |
env: | |
TOFUPILOT_API_KEY: ${{ secrets.CLIMATIC_CHAMBER_API_KEY }} | |
run: | | |
for file in src/climatic-chamber/python-client/*.py; do | |
python "$file" | |
done | |
# Set TOFUPILOT_API_KEY and run all Python files in corresponding folder | |
- name: Run Drone scripts for first drone organization | |
env: | |
TOFUPILOT_API_KEY: ${{ secrets.DRONE1_API_KEY }} | |
run: | | |
for file in src/drone/python-client/*.py; do | |
python "$file" | |
done | |
# Set TOFUPILOT_API_KEY and run all Python files in corresponding folder | |
- name: Run Drone scripts for second drone organization | |
env: | |
TOFUPILOT_API_KEY: ${{ secrets.DRONE2_API_KEY }} | |
run: | | |
for file in src/drone/python-client/*.py; do | |
python "$file" | |
done | |
# Set TOFUPILOT_API_KEY and run all Python files in corresponding folder | |
- name: Run Drone scripts for third drone organizatoin | |
env: | |
TOFUPILOT_API_KEY: ${{ secrets.DRONE3_API_KEY }} | |
run: | | |
for file in src/drone/python-client/*.py; do | |
python "$file" | |
done |