Fetch and update cron data #298
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Install dependencies | |
uses: './.github/actions/install-deps' | |
- 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 | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Install dependencies | |
uses: './.github/actions/install-deps' | |
- 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 | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Install dependencies | |
uses: './.github/actions/install-deps' | |
- 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 |