From 1d775067930bb13b2018cb08ec52ca192c93b3ae Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 13 Feb 2024 12:25:09 -0500 Subject: [PATCH 1/4] initial GHA --- .github/pull_request_template.md | 6 ++++ .github/workflows/debug.yml | 54 ++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/debug.yml diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000000000..e871931956390 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,6 @@ +SUMMARY: +"please provide a brief summary" + +TEST PLAN: +"please outline how the changes were tested" + diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml new file mode 100644 index 0000000000000..e9e7b4f273966 --- /dev/null +++ b/.github/workflows/debug.yml @@ -0,0 +1,54 @@ +name: 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 From 3dc32a825a5cd87590a499994c17868a79649385 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 13 Feb 2024 12:28:42 -0500 Subject: [PATCH 2/4] add workflow info action --- .github/actions/workflow-info/action.yml | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/actions/workflow-info/action.yml diff --git a/.github/actions/workflow-info/action.yml b/.github/actions/workflow-info/action.yml new file mode 100644 index 0000000000000..f2018ccde9182 --- /dev/null +++ b/.github/actions/workflow-info/action.yml @@ -0,0 +1,25 @@ +name: workflow info +description: 'give a brief summary of workflow parameters' +inputs: + label: + description: "requested runner label (specifies instance)" + required: true + timeout: + description: "time limit for run in minutes " + required: true + gitref: + description: "git commit hash or branch name" + required: true +runs: + using: composite + steps: + - run: | + echo "workflow started ..." + echo "label: '${{ inputs.label }}'" + echo "github actor: '${{ github.actor }}'" + echo "repository: '${{ github.repository }}'" + echo "gitref: '${{ inputs.gitref }}'" + echo "branch name: '${{ github.ref_name }}'" + echo "user on instance: $(whoami)" + echo "workflow timeout: ${{ inputs.timeout }} (min)" + shell: bash From 8133586675ddcaa66c3ab7630090102e6cdbb044 Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 13 Feb 2024 13:19:55 -0500 Subject: [PATCH 3/4] prepend "nm_" to debug workflow --- .github/workflows/{debug.yml => nm_debug.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{debug.yml => nm_debug.yml} (100%) diff --git a/.github/workflows/debug.yml b/.github/workflows/nm_debug.yml similarity index 100% rename from .github/workflows/debug.yml rename to .github/workflows/nm_debug.yml From 360cfbecda097cbde0ffccf94d7d3b4d591c930f Mon Sep 17 00:00:00 2001 From: andy Date: Tue, 13 Feb 2024 13:22:29 -0500 Subject: [PATCH 4/4] adjust display name --- .github/workflows/nm_debug.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nm_debug.yml b/.github/workflows/nm_debug.yml index e9e7b4f273966..2104b0e040999 100644 --- a/.github/workflows/nm_debug.yml +++ b/.github/workflows/nm_debug.yml @@ -1,4 +1,4 @@ -name: debug instance +name: nm debug instance on: workflow_dispatch: inputs: