-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (48 loc) · 1.67 KB
/
automate.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Daily Data Retrieval Automation
on:
schedule:
- cron: "0 21 */2 * *" # Runs every other day at 9PM UTC (2PM PST the same day)
workflow_dispatch: # Allow manual trigger
jobs:
run-script:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Virtual enviornment set up
run: |
python -m venv venv
source venv/bin/activate
# If theres no changes in the requirements.txt file it will pull all the dependences from cache
- name: cache environment
id: cached-dependencies
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('requirements.txt') }}
- if: steps.cached-dependencies.outputs.cache-hit != 'true'
name: install python packages
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run script
run: python main.py --days-needed 2
# Custom CLI Command
# fmt: off
#LINT.IF .env.example
env:
LINKEDIN_URL: ${{ secrets.LINKEDIN_URL}}
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK}}
DB_URI: ${{ secrets.DB_URI}}
DB_TABLE: ${{ secrets.DB_TABLE}}
PALM_API_KEY: ${{ secrets.PALM_API_KEY}}
LINKEDIN_INTERN_URL: ${{ secrets.LINKEDIN_INTERN_URL}}
GH_INTERN24_URL: ${{ secrets.GH_INTERN24_URL}}
PROMPTS_PATH: ${{ secrets.PROMPTS_PATH}}
MESSAGE_PATH: ${{ secrets.MESSAGE_PATH}}
#LINT.END
# fmt: on