-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (49 loc) · 1.7 KB
/
package-graphql-poller.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
name: package-graphql-poller
on:
schedule:
- cron: "*/15 * * * *"
workflow_dispatch:
env:
# APP_DIRS here
APP_DIR_PACKAGE_GRAPHQL_POLLER: src/python/package_graphql_poller
# app specific variables
PACKAGE_GRAPHQL_POLLER_IO_DIR: packages
MOVE_DECOMPILER_BIN: third-party/move-decompiler/move-decompiler-linux-x86_64
jobs:
package-graphql-poller:
runs-on: ubuntu-ghcloud
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install poetry and dependencies
run: |
python3 -m pip install --upgrade pip
pip install poetry
OLDDIR=$(pwd)
cd "$APP_DIR_PACKAGE_GRAPHQL_POLLER"
poetry install --no-root
cd "$OLDDIR"
- name: Poetry run package-graphql-poller
run: |
echo "Running package graphql poller on mainnet and testnet" > /dev/stderr
OLDDIR=$(pwd)
cd "$APP_DIR_PACKAGE_GRAPHQL_POLLER"
poetry run \
python3 "$OLDDIR/$APP_DIR_PACKAGE_GRAPHQL_POLLER/main.py" \
--io-dir "$OLDDIR/$PACKAGE_GRAPHQL_POLLER_IO_DIR" \
--network mainnet \
--move-decompiler "$OLDDIR/$MOVE_DECOMPILER_BIN"
- name: Commit and Push Changes
id: commit-and-push
continue-on-error: true
run: |
git config --local user.name "GitHub Actions"
git config --local user.email "[email protected]"
git add "$PACKAGE_GRAPHQL_POLLER_IO_DIR"
git commit -m "package-graphql-poller: update package data"
git pull --rebase --depth=5
git push origin HEAD