Skip to content

Commit 89664bc

Browse files
committed
update workflows
1 parent bc636f0 commit 89664bc

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.github/actions/1-addition/1-maps/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ runs:
181181

182182
pip freeze | grep iree
183183
pip cache purge && find . -type d -name "__pycache__" -exec rm -rf {} +
184-
python user_data/ft_client/test_client/app.py orgs.json ${{ inputs.action_path }}
184+
python user_data/ft_client/test_client/app.py orgs.json ${{ env.ID }}
185185

186186
##Ref: https://github.com/eq19/maps/tree/v3/pythonCode
187187
##python ${{ github.workspace }}/.github/entrypoint/artifact/python/gellmann.py
@@ -215,6 +215,7 @@ runs:
215215
TARGET_REPOSITORY=${{ env.TARGET_REPOSITORY }}
216216
WORKSPACE=/workspaces/${{ github.event.repository.name }}
217217
ARTIFACT=user_data/ft_client/test_client/results/orgs.json
218+
OUTPUT=user_data/strategies/hyperopt_params.json
218219
219220
- name: 🗑️ Delete Docker Tags AND Images
220221
id: delete_images

.github/actions/4-identition/6-grammar/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,6 @@ runs:
189189
-H "Accept: application/vnd.github.v3+json" \
190190
"https://api.github.com/repos/$TARGET_REPOSITORY/dispatches" \
191191
-d '{"event_type": "trigger_action", "client_payload": {"env": "prod", "version": "1.0"}}'
192-
echo -e "\nDispatched to https://github.com/${{ env.TARGET_REPOSITORY }}/actions"
193192
fi
193+
echo -e "\nDispatched to https://github.com/${{ env.TARGET_REPOSITORY }}/actions"
194194
fi

.github/entrypoint/init.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,15 @@ if [[ "${JOBS_ID}" == "1" ]]; then
9191
"https://api.github.com/repos/${GITHUB_REPOSITORY}/dispatches" \
9292
-d '{"event_type": "retry_workflow", "client_payload": {"original_run_id": "${GITHUB_RUN_ID}"}}'
9393
exit 1
94+
else
95+
HEADER="Accept: application/vnd.github+json"
96+
RESPONSE=$(gh api -H "${HEADER}" repos/$TARGET_REPOSITORY/actions/runners)
97+
STATUS=$(echo "$RESPONSE" | jq -r --arg NAME "$RUNNER_TITLE" '.runners[] | select(.name == $NAME).status')
98+
99+
if [[ "$STATUS" == "offline" ]]; then
100+
RUNNER_ID=$(gh api -H "${HEADER}" /repos/$TARGET_REPOSITORY/actions/runners --jq '.runners.[].id')
101+
gh api --method DELETE -H "${HEADER}" /repos/$TARGET_REPOSITORY/actions/runners/${RUNNER_ID}
102+
fi
94103
fi
95104

96105
cd $GITHUB_WORKSPACE

0 commit comments

Comments
 (0)