@@ -16,15 +16,15 @@ jobs:
1616 timeout-minutes : 15
1717 env :
1818 GH_TOKEN : ${{ secrets.RUNNER_PAT || github.token }}
19- RUNNER_NAME : MyLocalPC
19+ MONITORED_RUNNER_NAME : CAS-Workstation-Kim
2020 EMAIL_TO : ${{ secrets.EMAIL_TO }}
2121 steps :
2222 - name : Check runner status
2323 id : status
2424 run : |
2525 set -euo pipefail
2626 status=""
27- if ! status="$(gh api repos/${GITHUB_REPOSITORY}/actions/runners --jq ".runners[] | select(.name==\"${RUNNER_NAME }\") | .status")"; then
27+ if ! status="$(gh api repos/${GITHUB_REPOSITORY}/actions/runners --jq ".runners[] | select(.name==\"${MONITORED_RUNNER_NAME }\") | .status")"; then
2828 status="unknown"
2929 fi
3030 if [ -z "${status}" ]; then
@@ -36,15 +36,15 @@ jobs:
3636 if : steps.status.outputs.runner_status != 'online'
3737 run : |
3838 set -euo pipefail
39- title="Runner offline: ${RUNNER_NAME }"
39+ title="Runner offline: ${MONITORED_RUNNER_NAME }"
4040 marker="Autopilot Runner Health"
4141 status="${{ steps.status.outputs.runner_status }}"
4242 gh label create runner-offline --color "B60205" --description "Runner offline alerts" --force --repo "${GITHUB_REPOSITORY}" || true
4343 existing="$(gh issue list -s open -l runner-offline -S "${title}" --repo "${GITHUB_REPOSITORY}" --json number --jq '.[0].number')"
4444 body=$(cat <<EOF
4545 ${marker}
4646
47- Runner: ${RUNNER_NAME }
47+ Runner: ${MONITORED_RUNNER_NAME }
4848 Status: ${status}
4949 Repo: ${GITHUB_REPOSITORY}
5050 Time: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
7676 server_port : ${{ env.SMTP_PORT }}
7777 username : ${{ env.SMTP_USERNAME }}
7878 password : ${{ env.SMTP_PASSWORD }}
79- subject : " Runner offline: MyLocalPC "
79+ subject : " Runner offline: ${{ env.MONITORED_RUNNER_NAME }} "
8080 body : |
81- Runner: MyLocalPC
81+ Runner: ${{ env.MONITORED_RUNNER_NAME }}
8282 Repo: ${{ github.repository }}
8383 Status: ${{ steps.status.outputs.runner_status }}
8484 to : ${{ env.EMAIL_TO }}
0 commit comments