This repository has been archived by the owner on Jun 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (57 loc) · 1.92 KB
/
cron_run_axies.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
58
59
60
61
62
63
64
65
66
67
68
69
name: Run Axies pipeline with cron
"on":
schedule:
- cron: '*/5 * * * *'
workflow_dispatch:
env:
GCP__PROJECT_ID: axies-ronin-pipeline
GCP__CLIENT_EMAIL: [email protected]
GCP__PRIVATE_KEY: ${{ secrets.GCP__PRIVATE_KEY }}
DEFAULT_DATASET: axies_github_1
jobs:
maybe_skip:
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v4
with:
concurrent_skipping: 'always'
skip_after_successful_duplicate: 'false'
do_not_skip: '[]'
get_axie_data:
needs: maybe_skip
if: ${{ needs.maybe_skip.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: "3.10.x"
- uses: syphar/restore-virtualenv@v1
id: cache-virtualenv
with:
requirement_files: requirements.txt # this is optional
- uses: syphar/restore-pip-download-cache@v1
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
- run: pip install -r requirements.txt
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
# - name: Load cached venv
# id: cached-dependencies
# uses: actions/cache@v2
# with:
# path: .venv
# key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}-axies
# - name: Install dependencies
# run: pip install -r requirements.txt
- name: Restoring pipeline state
uses: jorgebg/[email protected]
with:
branch: pipeline
backup: 2
- name: Run Axies Pipeline
run: python axies.py && python axies_load.py