Fetch and update LP APRs #74
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 LP APRs | |
on: | |
workflow_dispatch: | |
schedule: | |
# 23:15 UTC | |
# GitHub Actions might be delayed if time is at exact hour | |
- cron: '15 23 * * *' | |
jobs: | |
updateLPsAPRs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14.x | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Fetch and save LP APR data | |
run: yarn updateLPsAPR | |
env: | |
NEXT_PUBLIC_SF_HEADER: ${{ secrets.SF_HEADER }} | |
NEXT_PUBLIC_CHAIN_ID: '56' | |
- name: Format | |
run: yarn format:write | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v3 | |
with: | |
author: PancakeSwap Bot <pancakeswap-bot@protonmail.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 |