-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from BalancerMaxis/manual-action
add manual run action.
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Generate STIP Epoch Paylods | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
epoch_end_date: | ||
description: 'The date like YYYY-MM-DD that the epoch you wish to run for ended. Should be a thursday aon a week when Aura voting concluded' | ||
require: true | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TIMESTAMP: ${{ inputs.pr_number }} | ||
|
||
jobs: | ||
genPayload: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: tools/python | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Generate Payload and report | ||
run: | | ||
DAY=${{ github.event.inputs.epoch_end_date }} | ||
TIMESTAMP=${date -d $DAY 00:00:00} | ||
echo "Running for $DAY $TIMESTAMP" | ||
pip install -r requirements.txt | ||
python3 main.py --ts_bound $TIMESTAMP | ||
- name: Create PR | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
commit-message: "Generate incentives run for ${{ github.event.inputs.epoch_end_date }}" | ||
title: "Generate incentives run for ${{ github.event.inputs.epoch_end_date }}" | ||
assignees: tritium-vlk | ||
branch: gha-payment-round | ||
delete-branch: true | ||
labels: "Automated PR" | ||
branch-suffix: timestamp |