forked from LongForWisdom/rp-bounty
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) · 1.65 KB
/
price-update.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
name: price-update
on:
workflow_dispatch:
schedule:
- cron: "00 00 * * *"
jobs:
get_rss:
runs-on: ubuntu-latest
name: Update Price Data
steps:
- name: Checkout
uses: actions/[email protected]
with:
submodules: 'true'
ref: production
- name: Get RPL Price
continue-on-error: true
uses: fjogeleit/[email protected]
with:
url: "https://optimism-mainnet.infura.io/v3/${{ secrets.INFURA }}"
data: '{"jsonrpc": "2.0", "id": 1, "method": "eth_call", "params": [{"to":"0xADE082c91A6AeCC86fC11704a830e933e1b382eA","data":"0x50d25bcd"}, "latest"]}'
responseFile: _data/price-responses/rpl-usd.json
- name: Create Pull Request
id: create-pr
uses: peter-evans/create-pull-request@v5
with:
commit-message: "Automated update of source data via github action"
token: ${{ secrets.GITHUB_TOKEN }}
branch: temp-price-updates
delete-branch: true
title: 'Update Price Data'
body: "Automated update of price data via github action. Currently RPL-USD price update."
- name: Approve Pull Request
id: approve-pr
uses: hmarr/[email protected]
with:
github-token: ${{ secrets.PAT }}
pull-request-number: ${{ steps.create-pr.outputs.pull-request-number }}"
- name: Merge Pull Request
uses: juliangruber/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.create-pr.outputs.pull-request-number }}"