Skip to content

Commit

Permalink
trying github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Poojan38380 committed Oct 2, 2024
1 parent 74eecb6 commit ad15c0f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/automation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run Python Automation Bot

on:
schedule:
# Run at 7 AM, 12:30 PM, and 7 PM daily
- cron: "0 7,19 * * *" # Runs at 7:00 AM and 7:00 PM
- cron: "30 12 * * *" # Runs at 12:30 PM

jobs:
run-bot:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout code
uses: actions/checkout@v3

# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x" # Set to the version your script requires

# Step 3: Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# Step 4: Run the Python automation script
- name: Run auto.py
run: python auto.py
5 changes: 5 additions & 0 deletions auto.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

from modules.poster import post_reel_to_all_accounts

if __name__ == "__main__":
post_reel_to_all_accounts()

0 comments on commit ad15c0f

Please sign in to comment.