-
Notifications
You must be signed in to change notification settings - Fork 1
executable file
·69 lines (57 loc) · 2.14 KB
/
build_logic_testnet.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: Process building feature (TestNet)
on:
schedule:
- cron: "35 */2 * * *"
workflow_dispatch:
concurrency:
group: ${{ github.head_ref || github.ref_name }}
jobs:
process_deposits:
name: Run building feature worker
runs-on: ubuntu-latest
env:
BUILD_MANAGER_PASSPHRASE: ${{ secrets.BUILD_MANAGER_PASSPHRASE }}
LEDGER_TYPE: TestNet
steps:
- uses: actions/checkout@v3
with:
ref: testnet
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.8
- name: Set up Poetry
uses: abatilo/actions-poetry@v2.3.0
with:
poetry-version: 1.4.2
- name: Install python dependencies
run: poetry install
- name: Fetch new build tx
run: |
PYTHONPATH="." poetry run python src/aw_build/process_build.py
- name: Fetch tiles config tx
run: |
PYTHONPATH="." poetry run python src/aw_build/fetch_tiles.py
- name: setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Commit files
id: commit_files
if: always()
run: |
git config --local user.email "millionalgos@pm.me"
git config --local user.name "github-actions[bot]"
if [ -n "$(git status --porcelain)" ]; then
git commit -m "chore(testnet): refreshed building data 🤖" -a
echo "HAS_COMMITS=true" >> "$GITHUB_ENV"
else
echo "no changes - skipping "
echo "HAS_COMMITS=false" >> "$GITHUB_ENV"
fi
- name: Push changes
uses: ad-m/github-push-action@master
if: env.HAS_COMMITS != false
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: testnet