From 1e9d0a54862ea731682b3a6aaa3935b95075b4cc Mon Sep 17 00:00:00 2001 From: TWloYWkgQm9kbmFyaXU= Date: Mon, 8 Apr 2024 08:34:12 +0300 Subject: [PATCH] fix: add additional filtering --- .github/workflows/v2-apply-scoring.yml | 8 ++++---- .github/workflows/v2-apply-unstakes.yml | 2 +- .github/workflows/v2-prepare-unstakes.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/v2-apply-scoring.yml b/.github/workflows/v2-apply-scoring.yml index 136836d..c012705 100644 --- a/.github/workflows/v2-apply-scoring.yml +++ b/.github/workflows/v2-apply-scoring.yml @@ -23,10 +23,10 @@ jobs: run: | set -ex git fetch --all - scores_csv=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'scoring run' | grep scores.csv) - params_json=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'scoring run' | grep params.json) + scores_csv=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'scoring run' | grep scores.csv | grep scoring-v2) + params_json=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'scoring run' | grep params.json | grep scoring-v2) - scoring_run_ui_id=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'scoring run' | head -6 | tail -1 | awk -F / '{print $2}') + scoring_run_ui_id=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'scoring run' | grep scoring-v2 | head -6 | tail -1 | awk -F / '{print $2}') epoch=$(<<<"$scoring_run_ui_id" awk -F . '{print $1}') weightVoteCredits=$(jq '.weightVoteCredits' $params_json) @@ -129,7 +129,7 @@ jobs: run: | set -ex unstake_hints_json=$(git log -1 --name-only --pretty=format: --grep 'scoring run' | grep unstake-hints.json) - scoring_run_ui_id=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'scoring run' | head -6 | tail -1 | awk -F / '{print $2}') + scoring_run_ui_id=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'scoring run' | grep scoring-v2 | head -6 | tail -1 | awk -F / '{print $2}') epoch=$(<<<"$scoring_run_ui_id" awk -F . '{print $1}') if [[ -z $unstake_hints_json ]] diff --git a/.github/workflows/v2-apply-unstakes.yml b/.github/workflows/v2-apply-unstakes.yml index 7c57501..36b7c9e 100644 --- a/.github/workflows/v2-apply-unstakes.yml +++ b/.github/workflows/v2-apply-unstakes.yml @@ -23,7 +23,7 @@ jobs: run: | set -ex unstake_hints_json=$(git log -1 --name-only --pretty=format: --grep 'emergency unstakes' | grep unstake-hints.json) - scoring_run_ui_id=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'emergency unstakes' | head -3 | tail -1 | awk -F / '{print $2}') + scoring_run_ui_id=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'emergency unstakes' | grep scoring-v2 | head -3 | tail -1 | awk -F / '{print $2}') epoch=$(<<<"$scoring_run_ui_id" awk -F . '{print $1}') if [[ -z $unstake_hints_json ]] diff --git a/.github/workflows/v2-prepare-unstakes.yml b/.github/workflows/v2-prepare-unstakes.yml index e287108..3940c65 100644 --- a/.github/workflows/v2-prepare-unstakes.yml +++ b/.github/workflows/v2-prepare-unstakes.yml @@ -18,8 +18,8 @@ jobs: - name: Load scoring unstakes details run: | set -ex - unstake_hints_json=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'scoring run' | grep unstake-hints.json) - scoring_run_ui_id=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'scoring run' | head -6 | tail -1 | awk -F / '{print $2}') + unstake_hints_json=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'scoring run' | grep scoring-v2 | grep unstake-hints.json) + scoring_run_ui_id=$(git log -1 origin/scoring-v2 --name-only --pretty=format: --grep 'scoring run' | grep scoring-v2 | head -6 | tail -1 | awk -F / '{print $2}') epoch=$(<<<"$scoring_run_ui_id" awk -F . '{print $1}') if [[ -z $unstake_hints_json ]]