This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
nm debug instance #1
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
name: nm debug instance | |
on: | |
workflow_dispatch: | |
inputs: | |
label: | |
description: "requested runner label (specifies instance)" | |
type: string | |
required: true | |
timeout: | |
description: "approximate number of minutes to keep instance up (should be at least 20)." | |
type: string | |
required: true | |
gitref: | |
description: "git commit hash or branch name" | |
type: string | |
required: true | |
jobs: | |
DEBUG: | |
runs-on: ${{ inputs.label }} | |
timeout-minutes: ${{ fromJSON(inputs.timeout) }} | |
steps: | |
- name: checkout repository code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ inputs.gitref }} | |
submodules: recursive | |
- name: workflow info | |
uses: ./.github/actions/workflow-info/ | |
with: | |
gitref: ${{ inputs.gitref }} | |
label: ${{ inputs.label }} | |
timeout: ${{ inputs.timeout }} | |
####################################################### | |
- name: announce pause | |
run: | | |
M=${{ inputs.timeout }} | |
R=$((M - 15)) | |
S=$((R * 60)) | |
echo "pausing for, ${R} minutes" | |
- name: pause workflow | |
run: | | |
M=${{ inputs.timeout }} | |
R=$((M - 15)) | |
S=$((R * 60)) | |
sleep $S |