Skip to content

.github/workflows/instance_on_off.yml #34

.github/workflows/instance_on_off.yml

.github/workflows/instance_on_off.yml #34

name: Schedule Python Script
on:
schedule:
- cron: '0 7 * * *'
- cron: '0 2 * * *'
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: create .env
run: |
touch .env
echo ${{ secrets.EC2_SCHEDULER_ENV }} >> .env
- name: Run Python script
run: |
pip3 install boto3
python ./automation/pipeline_scripts/instance_on_off.py