Skip to content

Commit

Permalink
add automatic run
Browse files Browse the repository at this point in the history
  • Loading branch information
ashharrison90 committed Dec 23, 2024
1 parent 053cb82 commit b3a13c4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/daily.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Daily job

on:
schedule:
- cron: '0 3 * * *'

jobs:
pickTeam:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup Python
uses: actions/[email protected]
- name: Install glpk-utils
run: sudo apt-get install glpk-utils
- name: Install numpy
run: pip3 install numpy
- name: Install other deps
run: pip3 install pandas pulp requests torch
- name: Run solver
env:
FANTASY_PL_USERNAME: ${{ secrets.FANTASY_PL_USERNAME }}
FANTASY_PL_PASSWORD: ${{ secrets.FANTASY_PL_PASSWORD }}
run: python3 main.py $FANTASY_PL_USERNAME --password $FANTASY_PL_PASSWORD --log-level debug --apply --check-deadline
4 changes: 2 additions & 2 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Manual workflow
name: Manual run

# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
Expand Down Expand Up @@ -27,4 +27,4 @@ jobs:
env:
FANTASY_PL_USERNAME: ${{ secrets.FANTASY_PL_USERNAME }}
FANTASY_PL_PASSWORD: ${{ secrets.FANTASY_PL_PASSWORD }}
run: python3 main.py $FANTASY_PL_USERNAME --password $FANTASY_PL_PASSWORD --log-level debug --apply --check-deadline
run: python3 main.py $FANTASY_PL_USERNAME --password $FANTASY_PL_PASSWORD --log-level debug --apply

0 comments on commit b3a13c4

Please sign in to comment.