-
Notifications
You must be signed in to change notification settings - Fork 3.5k
177 lines (148 loc) · 5.36 KB
/
updateCron.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
name: Fetch and update cron data
on:
workflow_dispatch:
schedule:
# 23:15 UTC
# GitHub Actions might be delayed if time is at exact hour
- cron: '15 23 * * *'
jobs:
updateAptosLPsAPR:
runs-on: ubuntu-latest
if: github.repository == 'pancakeswap/pancake-frontend'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up node@18
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: 18.18.2
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --ignore-scripts
- name: Fetch and save Aptos LP APR data
run: pnpm updateAptosLPsAPR
- name: Format
run: pnpm prettier --write "apps/aptos/config/constants/lpAprs/*.{ts,json}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
author: PancakeSwap Bot <github-bot@pancakeswap.com>
token: ${{ secrets.LP_APR_PANCAKE_BOT }}
delete-branch: true
commit-message: 'chore: Update Aptos LP APRs for Farms'
title: 'chore: Update Aptos LP APRs for Farms'
body: |
- Update Aptos LP APRs for Farms
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: automerge
branch: update-aptos-lp-aprs-for-farms
updateLPsAPRs:
runs-on: ubuntu-latest
if: github.repository == 'pancakeswap/pancake-frontend'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up node@18
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: 18.18.2
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --ignore-scripts
- name: Fetch and save LP APR data
run: pnpm updateLPsAPR
env:
NEXT_PUBLIC_NODE_REAL_HEADER: ${{ secrets.NODE_REAL_HEADER }}
NEXT_PUBLIC_EXPLORE_API_ENDPOINT: ${{ vars.NEXT_PUBLIC_EXPLORE_API_ENDPOINT }}
- name: Format
run: pnpm prettier --write "apps/web/src/config/constants/lpAprs/*.{ts,json}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
author: PancakeSwap Bot <github-bot@pancakeswap.com>
token: ${{ secrets.LP_APR_PANCAKE_BOT }}
delete-branch: true
commit-message: 'chore: Update LP APRs for Farms'
title: 'chore: Update LP APRs for Farms'
body: |
- Update LP APRs for Farms
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: automerge
branch: update-lp-aprs-for-farms
updateMerkl:
runs-on: ubuntu-latest
if: github.repository == 'pancakeswap/pancake-frontend'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up node@18
uses: actions/setup-node@v3
with:
cache: 'pnpm'
node-version: 18.18.2
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm i --ignore-scripts
- name: Fetch and save Merkl data
run: pnpm updateMerkl
env:
NEXT_PUBLIC_NODE_REAL_HEADER: ${{ secrets.NODE_REAL_HEADER }}
- name: Format
run: pnpm prettier --write "apps/web/src/config/constants/merklPools.json"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
author: PancakeSwap Bot <github-bot@pancakeswap.com>
token: ${{ secrets.LP_APR_PANCAKE_BOT }}
delete-branch: true
commit-message: 'chore: Update Merkl Pools'
title: 'chore: Update Merkl Pools'
body: |
- Update Merkl Pools
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: automerge
branch: update-merkl-pools