-
Notifications
You must be signed in to change notification settings - Fork 38
43 lines (42 loc) · 1.49 KB
/
develop-push.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
name: push to gas-estimates
on:
push:
branches:
- develop
jobs:
push-to-gas-estimates:
name: Save gas estimates
runs-on: ubuntu-latest
environment: testing-keys
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '10.x'
- name: Estimate gas
env:
MNEMONIC_KEY: ${{ secrets.MNEMONIC_KEY }}
ALCHEMY_MAINNET_KEY: ${{ secrets.ALCHEMY_MAINNET_KEY }}
ALCHEMY_RINKEBY_KEY: ${{ secrets.ALCHEMY_RINKEBY_KEY }}
ALCHEMY_ROPSTEN_KEY: ${{ secrets.ALCHEMY_ROPSTEN_KEY }}
INFURA_KEY: ${{ secrets.INFURA_KEY }}
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
CMC_KEY: ${{ secrets.CMC_KEY }}
SAVE_GAS_REPORT: '1'
ORIGIN: 'https://github.com/${{ github.repository }}'
run: |
yarn
yarn compile
yarn test
yarn test utils/gas-estimator.ts
mkdir -p gas/$GITHUB_SHA gas/HEAD
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git fetch $ORIGIN gas-estimates:gas-estimates
git checkout gas-estimates
mv gas-reporter.txt gas/$GITHUB_SHA/
mv gas-estimation.csv gas/$GITHUB_SHA/
cp gas/$GITHUB_SHA/* gas/HEAD/
git add gas
git commit -m "Gas estimations for commit $GITHUB_SHA"
git push $ORIGIN gas-estimates