Skip to content

Run Python Script

Run Python Script #1

name: Run Python Script
on:
# Run the workflow every day at midnight (00:00) UTC.
workflow_dispatch: # Allows manual triggering
schedule:
- cron: '0 0 * * *'
jobs:
run-python-script:
runs-on: ubuntu-latest # Use Ubuntu as the runner environment
steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v2
# Step 2: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12' # Specify the Python version (e.g., '3.x')
# Step 3: Install dependencies (optional, if your script has requirements)
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r scripts/requirements.txt
# Step 4: Run your Python script
- name: Run Python script
run: python ./scripts/check_openapi_version.py