From a090d468a80862fa43db7e9b96adf689adaefab6 Mon Sep 17 00:00:00 2001 From: BIP Bot Date: Fri, 29 Dec 2023 01:03:29 +0100 Subject: [PATCH 1/3] add manual run action. --- .github/workflows/run_payment_round.yaml | 43 ++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/run_payment_round.yaml diff --git a/.github/workflows/run_payment_round.yaml b/.github/workflows/run_payment_round.yaml new file mode 100644 index 0000000..1fb18cd --- /dev/null +++ b/.github/workflows/run_payment_round.yaml @@ -0,0 +1,43 @@ +name: Generate feeSweep payloads + +on: + workflow_dispatch: + inputs: + end_time_stamp: + description: 'The unix timestamp of the end of the period, should be a Thursday at 00:00 GMT' + 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: | + 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.end_time_stamp }}" + title: "Generate incentives run for ${{ github.event.inputs.end_time_stamp }}" + assignees: tritium-vlk + branch: gha-payment-round + delete-branch: true + labels: "Automated PR" + branch-suffix: timestamp \ No newline at end of file From dda572aa05efc12e88c57e505aa09a33d8646d66 Mon Sep 17 00:00:00 2001 From: BIP Bot Date: Thu, 25 Jan 2024 14:12:30 +0100 Subject: [PATCH 2/3] update action. --- .github/workflows/run_payment_round.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_payment_round.yaml b/.github/workflows/run_payment_round.yaml index 1fb18cd..c0f373d 100644 --- a/.github/workflows/run_payment_round.yaml +++ b/.github/workflows/run_payment_round.yaml @@ -1,10 +1,10 @@ -name: Generate feeSweep payloads +name: Generate STIP Epoch Paylods on: workflow_dispatch: inputs: - end_time_stamp: - description: 'The unix timestamp of the end of the period, should be a Thursday at 00:00 GMT' + 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: @@ -28,6 +28,9 @@ jobs: - 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 From dedeaccab2889b0a688068b13405eb32985d54ec Mon Sep 17 00:00:00 2001 From: BIP Bot Date: Thu, 25 Jan 2024 14:33:05 +0100 Subject: [PATCH 3/3] fix var name., --- .github/workflows/run_payment_round.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_payment_round.yaml b/.github/workflows/run_payment_round.yaml index c0f373d..09a37fa 100644 --- a/.github/workflows/run_payment_round.yaml +++ b/.github/workflows/run_payment_round.yaml @@ -37,8 +37,8 @@ jobs: - name: Create PR uses: peter-evans/create-pull-request@v5 with: - commit-message: "Generate incentives run for ${{ github.event.inputs.end_time_stamp }}" - title: "Generate incentives run for ${{ github.event.inputs.end_time_stamp }}" + 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