Skip to content

Commit

Permalink
sum-staking-rewards
Browse files Browse the repository at this point in the history
  • Loading branch information
timotejvesel committed Nov 17, 2023
1 parent 7699dd3 commit 58d54e3
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,15 @@ jobs:
echo "EPOCH_OF4_if0=$(( $(( $USE_REWARD_EPOCH - 1 )) % 4 ))" >> "$GITHUB_ENV"
- name: Generate .html report for epoch ${{ env.USE_REWARD_EPOCH }}
if: env.EPOCH_OF4_if0 != 0
run: |
jq --raw-output --monochrome-output '.NUM_EPOCHS = 1' configs/networks/flare.json | sponge configs/networks/flare.json
jq --raw-output --monochrome-output --argjson epoch "$USE_REWARD_EPOCH" '.REWARD_EPOCH = $epoch' configs/networks/flare.json | sponge configs/networks/flare.json
yarn run process-staking-rewards
.github/workflows/generate-report-html.sh ${USE_REWARD_EPOCH}
- name: Create combined report [epoch ${{ env.USE_FIRST_REWARD_EPOCH }}-${{ env.USE_REWARD_EPOCH }}]
if: env.EPOCH_OF4_if0 == 0
run: |
jq --raw-output --monochrome-output '.NUM_EPOCHS = 1' configs/networks/flare.json | sponge configs/networks/flare.json
for EPOCH in {${{ env.USE_FIRST_REWARD_EPOCH }}..${{ env.USE_REWARD_EPOCH }}}; do
jq --raw-output --monochrome-output --argjson epoch "$EPOCH" '.REWARD_EPOCH = $epoch' configs/networks/flare.json | sponge configs/networks/flare.json
yarn run process-staking-rewards
.github/workflows/generate-report-html.sh "${EPOCH}"
done
jq --raw-output --monochrome-output '.NUM_EPOCHS = 4' configs/networks/flare.json | sponge configs/networks/flare.json
jq --raw-output --monochrome-output --argjson epoch "$USE_REWARD_EPOCH" '.REWARD_EPOCH = $epoch' configs/networks/flare.json | sponge configs/networks/flare.json
yarn sum-staking-rewards
Expand Down

0 comments on commit 58d54e3

Please sign in to comment.