-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (47 loc) · 1.59 KB
/
update.yml
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
56
57
name: Update Prizes
on:
schedule:
- cron: '0 2 * * *' # Run at 2 AM UTC daily
workflow_dispatch: # Allow manual triggers
jobs:
update-prizes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'requirements.txt'
- name: Install Chrome
run: |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install -y google-chrome-stable
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --no-cache-dir -r requirements.txt
- name: Run script
env:
CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
PROXY_API_URL: ${{ secrets.PROXY_API_URL }}
PROXY_API_TOKEN: ${{ secrets.PROXY_API_TOKEN }}
run: python -u main.py
timeout-minutes: 5
- name: List workspace files (debug)
if: always()
run: ls -la
- name: Show log file content
if: always()
run: |
echo "----- LOG FILE CONTENT -----"
cat logs/*.log
- name: Upload debug screenshot artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: debug-screenshots
path: "*_failure_*.png"