From 9aa3cc88bd5aa11f12a13d92697de2e1d8bedede Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 18 Oct 2023 17:29:20 +0000 Subject: [PATCH 01/38] trying status of CI as a workflow action --- .github/workflows/orion_status.yaml | 57 +++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/orion_status.yaml diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml new file mode 100644 index 0000000000..38eb189b2e --- /dev/null +++ b/.github/workflows/orion_status.yaml @@ -0,0 +1,57 @@ +name: OrionStatus + +on: + workflow_dispatch: + pull_request: + types: [labeled] + +jobs: + + getlabels: + runs-on: ubuntu-latest + outputs: + labels: ${{ steps.id.outputs.labels }} + steps: + - name: Get Label Steps + id: id + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OWNER: ${{ github.repository_owner }} + REPO_NAME: ${{ github.event.repository.name }} + PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} + run: | + LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" + LABELS=$(echo "$LABELS1" | tr '\n' ' ') + echo "labels=$LABELS" >> $GITHUB_OUTPUT + + Ready: + if: contains( needs.getlabels.outputs.labels, 'CI-Orion-Ready') + runs-on: ubuntu-latest + needs: + - getlabels + + steps: + - name: Ready + run: echo "Ready" + + Building: + if: contains( needs.getlabels.outputs.labels, 'CI-Orion-Building') + runs-on: ubuntu-latest + needs: + - getlabels + - Ready + + steps: + - name: Building + run: echo "Building" + + Passed: + if: contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') + runs-on: ubuntu-latest + needs: + - getlabels + - Building + + steps: + - name: Passed + run: echo "Passed" From 92f2306f340ef297f469451df9ac323df5e8260f Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 18 Oct 2023 18:20:45 +0000 Subject: [PATCH 02/38] added PR number as input --- .github/workflows/orion_status.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index 38eb189b2e..a673d5093f 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -2,8 +2,11 @@ name: OrionStatus on: workflow_dispatch: - pull_request: - types: [labeled] + inputs: + pr_number: + description: PR number + type: string + pull_request: [labeled] jobs: @@ -18,7 +21,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} OWNER: ${{ github.repository_owner }} REPO_NAME: ${{ github.event.repository.name }} - PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }} + PULL_REQUEST_NUMBER: ${{ inputs.pr_number }} run: | LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" LABELS=$(echo "$LABELS1" | tr '\n' ' ') From 8c4b2f0246bf0f1709f317ac349d5a43e48ab53b Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 18 Oct 2023 18:24:37 +0000 Subject: [PATCH 03/38] Update orion_status.yaml type labeled on new line --- .github/workflows/orion_status.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index a673d5093f..210e41fb1f 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -6,7 +6,8 @@ on: pr_number: description: PR number type: string - pull_request: [labeled] + pull_request: + types: [labeled] jobs: From 74aa7347c606d6a9edcd842f27af8f5c8fb85901 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 18 Oct 2023 18:37:54 +0000 Subject: [PATCH 04/38] take out PR on on --- .github/workflows/orion_status.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index a673d5093f..80bb6861c5 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -6,7 +6,6 @@ on: pr_number: description: PR number type: string - pull_request: [labeled] jobs: From 9b8d071e4d6a550d027719e09d06814673f6992f Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 18 Oct 2023 19:07:17 +0000 Subject: [PATCH 05/38] take out PR on on do loops --- .github/workflows/orion_status.yaml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index 80bb6861c5..b92c27031b 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -27,17 +27,19 @@ jobs: echo "labels=$LABELS" >> $GITHUB_OUTPUT Ready: - if: contains( needs.getlabels.outputs.labels, 'CI-Orion-Ready') runs-on: ubuntu-latest needs: - getlabels steps: - name: Ready - run: echo "Ready" + run: | + until[ $ready ] + do + ready=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Ready') }}) + done Building: - if: contains( needs.getlabels.outputs.labels, 'CI-Orion-Building') runs-on: ubuntu-latest needs: - getlabels @@ -45,10 +47,13 @@ jobs: steps: - name: Building - run: echo "Building" + run: | + until[ $building ] + do + building=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Building') }}) + done Passed: - if: contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') runs-on: ubuntu-latest needs: - getlabels @@ -56,4 +61,8 @@ jobs: steps: - name: Passed - run: echo "Passed" + run: | + until[ $passed ] + do + passed=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') }}) + done From de4fd80d356447194bc6e9386bc8b77b21dc63db Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 18 Oct 2023 19:15:24 +0000 Subject: [PATCH 06/38] take out PR on on do loops syntax until --- .github/workflows/orion_status.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index b92c27031b..cc745e4d1d 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -34,7 +34,8 @@ jobs: steps: - name: Ready run: | - until[ $ready ] + ready=False + until [ $ready ]; do ready=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Ready') }}) done @@ -48,7 +49,8 @@ jobs: steps: - name: Building run: | - until[ $building ] + building=False + until [ $building ]; do building=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Building') }}) done @@ -62,7 +64,8 @@ jobs: steps: - name: Passed run: | - until[ $passed ] + passed=False + until [ $passed ]; do passed=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') }}) done From 3623231113fda22da14de68a0c30d6301619fb78 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 18 Oct 2023 19:32:20 +0000 Subject: [PATCH 07/38] take out PR on on do loops syntax until singleton --- .github/workflows/orion_status.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index cc745e4d1d..86750b1f02 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -35,7 +35,7 @@ jobs: - name: Ready run: | ready=False - until [ $ready ]; + until $ready do ready=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Ready') }}) done @@ -50,7 +50,7 @@ jobs: - name: Building run: | building=False - until [ $building ]; + until $building do building=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Building') }}) done @@ -65,7 +65,7 @@ jobs: - name: Passed run: | passed=False - until [ $passed ]; + until $passed do passed=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') }}) done From 218a084cfcef6032419d9df0bd40a1d6840009be Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 18 Oct 2023 19:37:54 +0000 Subject: [PATCH 08/38] take out PR on on do loops syntax until set faulse --- .github/workflows/orion_status.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index 86750b1f02..7c29c23ed3 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -34,7 +34,7 @@ jobs: steps: - name: Ready run: | - ready=False + ready=false until $ready do ready=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Ready') }}) @@ -49,7 +49,7 @@ jobs: steps: - name: Building run: | - building=False + building=false until $building do building=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Building') }}) @@ -64,7 +64,7 @@ jobs: steps: - name: Passed run: | - passed=False + passed=false until $passed do passed=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') }}) From 83d5c791058b0486c7d506f88d28fb2303ad113d Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 18 Oct 2023 19:53:11 +0000 Subject: [PATCH 09/38] take out PR on on do loops syntax until direct --- .github/workflows/orion_status.yaml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index 7c29c23ed3..743d89b9fe 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -34,10 +34,8 @@ jobs: steps: - name: Ready run: | - ready=false - until $ready + until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Ready') }} do - ready=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Ready') }}) done Building: @@ -49,10 +47,8 @@ jobs: steps: - name: Building run: | - building=false - until $building + until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Building') }} do - building=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Building') }}) done Passed: @@ -64,8 +60,6 @@ jobs: steps: - name: Passed run: | - passed=false - until $passed + until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') }} do - passed=$(${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') }}) done From de55f1a651e70204e0164fc5ef00f9faf6aaa9de Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 18 Oct 2023 20:01:32 +0000 Subject: [PATCH 10/38] take out PR on on do loops needed noop --- .github/workflows/orion_status.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index 743d89b9fe..e5d62e19f6 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -36,7 +36,8 @@ jobs: run: | until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Ready') }} do - done + noop="" + done Building: runs-on: ubuntu-latest @@ -49,7 +50,8 @@ jobs: run: | until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Building') }} do - done + noop="" + done Passed: runs-on: ubuntu-latest @@ -62,4 +64,5 @@ jobs: run: | until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') }} do - done + noop="" + done From 5b3e6cc3a6b3b3b44a9e12032c866d6137749f27 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 18 Oct 2023 21:06:49 +0000 Subject: [PATCH 11/38] take out PR jobs with no steps --- .github/workflows/orion_status.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index e5d62e19f6..eacfa374d9 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -31,7 +31,6 @@ jobs: needs: - getlabels - steps: - name: Ready run: | until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Ready') }} @@ -45,7 +44,6 @@ jobs: - getlabels - Ready - steps: - name: Building run: | until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Building') }} @@ -59,7 +57,6 @@ jobs: - getlabels - Building - steps: - name: Passed run: | until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') }} From 022dd282373d24e702ef059948b65a1cd89144b8 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 18 Oct 2023 21:07:44 +0000 Subject: [PATCH 12/38] take out PR jobs need steps --- .github/workflows/orion_status.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index eacfa374d9..cc483383dc 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -31,6 +31,7 @@ jobs: needs: - getlabels + steps: - name: Ready run: | until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Ready') }} @@ -44,6 +45,7 @@ jobs: - getlabels - Ready + steps: - name: Building run: | until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Building') }} @@ -57,9 +59,10 @@ jobs: - getlabels - Building + steps: - name: Passed run: | until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') }} do - noop="" + noop="" done From c9c8ae25820be9f8ca8a29d37e360d7a0845005f Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Wed, 18 Oct 2023 21:09:01 +0000 Subject: [PATCH 13/38] take out PR jobs need steps --- .github/workflows/orion_status.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index cc483383dc..5c53186e56 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -36,7 +36,7 @@ jobs: run: | until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Ready') }} do - noop="" + sleep 10m done Building: @@ -50,7 +50,7 @@ jobs: run: | until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Building') }} do - noop="" + sleep 10m done Passed: @@ -64,5 +64,5 @@ jobs: run: | until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') }} do - noop="" + sleep 10m done From 74a5b5a85b6fc3667c621cf9ff757f2f6dbca14e Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Thu, 19 Oct 2023 19:06:17 +0000 Subject: [PATCH 14/38] added reusable workflow for getting lables for each job --- .github/workflows/getlabels.yaml | 57 +++++++++++++++++++++++++++++ .github/workflows/orion_status.yaml | 17 --------- 2 files changed, 57 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/getlabels.yaml diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml new file mode 100644 index 0000000000..dda30b2183 --- /dev/null +++ b/.github/workflows/getlabels.yaml @@ -0,0 +1,57 @@ +on: + workflow_call: + inputs: + pr_number: + required: true + type: string + max_runtime: + required: false + type: string + stage: + required: true + type: string + + outputs: + state: + description: "The return state of Stage (true/false)" + value: ${{ jobs.getlabels.outputs.state }} + + secrets: + token: + required: true +jobs: + + getlabels: + runs-on: ubuntu-latest + outputs: + state: ${{ steps.id.outputs.state }} + steps: + - name: Get Label Steps + id: id + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OWNER: ${{ github.repository_owner }} + REPO_NAME: ${{ github.event.repository.name }} + PULL_REQUEST_NUMBER: ${{ inputs.pr_number }} + STAGE: ${{ inputs.stage }} + MAX_TIME: ${{ inputs.max_runtime }} + run: | + DONE=false + count=0 + until false + do + LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" + LABELS=$(echo "$LABELS1" | tr '\n' ' ') + check_label="CI-Orion-${STAGE}" + if [[ "${LABELS}" == *"${check_label}"* ]]; then + DONE=true + break + fi + sleep 10m + count=$((count+10)) + if [[ ${count} -gt ${MAX_TIME} ]]; then + DONE=false + break + fi + done + echo "state=$DONE" >> $GITHUB_OUPUT diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index 5c53186e56..8800609508 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -9,23 +9,6 @@ on: jobs: - getlabels: - runs-on: ubuntu-latest - outputs: - labels: ${{ steps.id.outputs.labels }} - steps: - - name: Get Label Steps - id: id - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OWNER: ${{ github.repository_owner }} - REPO_NAME: ${{ github.event.repository.name }} - PULL_REQUEST_NUMBER: ${{ inputs.pr_number }} - run: | - LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" - LABELS=$(echo "$LABELS1" | tr '\n' ' ') - echo "labels=$LABELS" >> $GITHUB_OUTPUT - Ready: runs-on: ubuntu-latest needs: From 9e306ef382b4844d78e28e5ded0d8212661482f8 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Thu, 19 Oct 2023 19:14:11 +0000 Subject: [PATCH 15/38] fixed uses path --- .github/workflows/orion_status.yaml | 78 +++++++++++++++++------------ 1 file changed, 47 insertions(+), 31 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index 8800609508..d56a050129 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -6,46 +6,62 @@ on: pr_number: description: PR number type: string + max_runtime: + description: Maximum time out time for running experment + type: string jobs: + get_Ready: + uses: ./.github/workflows/getlabels.yaml + with: + pr_number: inputs.pr_number + max_runtime: 20 + stage: "Ready" + secrets: inherit + Ready: runs-on: ubuntu-latest - needs: - - getlabels - + needs: get_Ready steps: - - name: Ready - run: | - until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Ready') }} - do - sleep 10m - done + - run: | + if [[ ${{ needs.get_Ready.outputs.state }} ]]; then + echo "Waiting for Ready State timmed out" + exit 1 + fi + + get_Building: + uses: ./.github/workflows/getlabels.yaml + with: + pr_number: inputs.pr_number + max_runtime: 40 + stage: "Building" + secrets: inherit Building: runs-on: ubuntu-latest - needs: - - getlabels - - Ready - + needs: get_Building steps: - - name: Building - run: | - until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Building') }} - do - sleep 10m - done - - Passed: - runs-on: ubuntu-latest - needs: - - getlabels - - Building + - run: | + if [[ ${{ needs.get_Building.outputs.state }} ]]; then + echo "Waiting for Ready State timmed out" + exit 1 + fi + get_Running: + uses: ./.github/workflows/getlabels.yaml + with: + pr_number: inputs.pr_number + max_runtime: 60 + stage: "Running" + secrets: inherit + + Running: + runs-on: ubuntu-latest + needs: get_Running steps: - - name: Passed - run: | - until ${{ contains( needs.getlabels.outputs.labels, 'CI-Orion-Passed') }} - do - sleep 10m - done + - run: | + if [[ ${{ needs.get_Running.outputs.state }} ]]; then + echo "Waiting for Ready State timmed out" + exit 1 + fi \ No newline at end of file From 1430ab38082525044b85286b51d8584aedbf63b3 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Thu, 19 Oct 2023 19:39:17 +0000 Subject: [PATCH 16/38] added dependances for main jobs and name in getlabels --- .github/workflows/getlabels.yaml | 2 ++ .github/workflows/orion_status.yaml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index dda30b2183..ffc40cc924 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -1,3 +1,5 @@ +name: Get Labels + on: workflow_call: inputs: diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index d56a050129..b2a80a40b3 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -40,7 +40,7 @@ jobs: Building: runs-on: ubuntu-latest - needs: get_Building + needs: [get_Building, Ready] steps: - run: | if [[ ${{ needs.get_Building.outputs.state }} ]]; then @@ -58,7 +58,7 @@ jobs: Running: runs-on: ubuntu-latest - needs: get_Running + needs: [get_Running, Building] steps: - run: | if [[ ${{ needs.get_Running.outputs.state }} ]]; then From 56b07342064b4d4d3404180241002368858191f8 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Thu, 19 Oct 2023 20:06:10 +0000 Subject: [PATCH 17/38] change order in needs --- .github/workflows/orion_status.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index b2a80a40b3..7cc7a1252f 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -40,7 +40,7 @@ jobs: Building: runs-on: ubuntu-latest - needs: [get_Building, Ready] + needs: [Ready, get_Building] steps: - run: | if [[ ${{ needs.get_Building.outputs.state }} ]]; then @@ -58,7 +58,7 @@ jobs: Running: runs-on: ubuntu-latest - needs: [get_Running, Building] + needs: [Building, get_Running] steps: - run: | if [[ ${{ needs.get_Running.outputs.state }} ]]; then From 7e14adb123904628109c64c7d288c9a49d8f15c2 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 01:27:34 +0000 Subject: [PATCH 18/38] took out poll --- .github/workflows/getlabels.yaml | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index ffc40cc924..c9dcbc6153 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -38,22 +38,11 @@ jobs: STAGE: ${{ inputs.stage }} MAX_TIME: ${{ inputs.max_runtime }} run: | - DONE=false - count=0 - until false - do - LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" - LABELS=$(echo "$LABELS1" | tr '\n' ' ') - check_label="CI-Orion-${STAGE}" - if [[ "${LABELS}" == *"${check_label}"* ]]; then - DONE=true - break - fi - sleep 10m - count=$((count+10)) - if [[ ${count} -gt ${MAX_TIME} ]]; then - DONE=false - break - fi - done + LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" + LABELS=$(echo "$LABELS1" | tr '\n' ' ') + check_label="CI-Orion-${STAGE}" + if [[ "${LABELS}" == *"${check_label}"* ]]; then + DONE=true + break + fi echo "state=$DONE" >> $GITHUB_OUPUT From 0615fad5eb03f5e743ddd8b7d8ab1154c6e5fe8c Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 01:31:03 +0000 Subject: [PATCH 19/38] took out secrets required line --- .github/workflows/getlabels.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index c9dcbc6153..156dcc3320 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -18,9 +18,6 @@ on: description: "The return state of Stage (true/false)" value: ${{ jobs.getlabels.outputs.state }} - secrets: - token: - required: true jobs: getlabels: From a9145c79014be6ac4674067de7aa9920d6c762c8 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 01:33:39 +0000 Subject: [PATCH 20/38] took out secrets required line --- .github/workflows/getlabels.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index 156dcc3320..3c5f441477 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -35,6 +35,7 @@ jobs: STAGE: ${{ inputs.stage }} MAX_TIME: ${{ inputs.max_runtime }} run: | + echo "gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name'" LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" LABELS=$(echo "$LABELS1" | tr '\n' ' ') check_label="CI-Orion-${STAGE}" From 9b8d608932c135256ad1f32ffea10baffd82f180 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 01:37:40 +0000 Subject: [PATCH 21/38] added {{}} on inputs.pr_number --- .github/workflows/orion_status.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index 7cc7a1252f..3bcd3cb5c3 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -15,7 +15,7 @@ jobs: get_Ready: uses: ./.github/workflows/getlabels.yaml with: - pr_number: inputs.pr_number + pr_number: ${{ inputs.pr_number }} max_runtime: 20 stage: "Ready" secrets: inherit From ac1b51cc79271c5e6baa0bef4586e64efd03e4f9 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 01:42:21 +0000 Subject: [PATCH 22/38] fixed other pr_number assiginments --- .github/workflows/getlabels.yaml | 27 +++++++++++++++++++-------- .github/workflows/orion_status.yaml | 4 ++-- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index 3c5f441477..3d6bfaffad 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -35,12 +35,23 @@ jobs: STAGE: ${{ inputs.stage }} MAX_TIME: ${{ inputs.max_runtime }} run: | - echo "gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name'" - LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" - LABELS=$(echo "$LABELS1" | tr '\n' ' ') - check_label="CI-Orion-${STAGE}" - if [[ "${LABELS}" == *"${check_label}"* ]]; then - DONE=true - break - fi + DONE=false + count=0 + until false + do + echo "$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name'" + LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" + LABELS=$(echo "$LABELS1" | tr '\n' ' ') + check_label="CI-Orion-${STAGE}" + if [[ "${LABELS}" == *"${check_label}"* ]]; then + DONE=true + break + fi + sleep 10m + count=$((count+10)) + if [[ ${count} -gt ${MAX_TIME} ]]; then + DONE=false + break + fi + done echo "state=$DONE" >> $GITHUB_OUPUT diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index 3bcd3cb5c3..e331411734 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -33,7 +33,7 @@ jobs: get_Building: uses: ./.github/workflows/getlabels.yaml with: - pr_number: inputs.pr_number + pr_number: ${{ inputs.pr_number }} max_runtime: 40 stage: "Building" secrets: inherit @@ -51,7 +51,7 @@ jobs: get_Running: uses: ./.github/workflows/getlabels.yaml with: - pr_number: inputs.pr_number + pr_number: ${{ inputs.pr_number }} max_runtime: 60 stage: "Running" secrets: inherit From 404a4543078bfd6cdbf7d90a3f0afb90d6196e6d Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 01:43:48 +0000 Subject: [PATCH 23/38] EOF error working --- .github/workflows/getlabels.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index 3d6bfaffad..993d5a7153 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -54,4 +54,4 @@ jobs: break fi done - echo "state=$DONE" >> $GITHUB_OUPUT + echo "state=$DONE" >> $GITHUB_OUPUT From 381832a197fde0e4ad63a120c9017e8d45f164fa Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 01:45:43 +0000 Subject: [PATCH 24/38] EOF error working II --- .github/workflows/getlabels.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index 993d5a7153..2372bbb9a5 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -39,7 +39,7 @@ jobs: count=0 until false do - echo "$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name'" + echo "gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name'" LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" LABELS=$(echo "$LABELS1" | tr '\n' ' ') check_label="CI-Orion-${STAGE}" From 3f6bd46d73ec96621ee178abe40f5a97cd068f49 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 01:52:33 +0000 Subject: [PATCH 25/38] ambiguous redrirect to GITHUB_OUTPUT --- .github/workflows/getlabels.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index 2372bbb9a5..020e937e45 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -54,4 +54,5 @@ jobs: break fi done - echo "state=$DONE" >> $GITHUB_OUPUT + echo "state=$DONE" + echo "state=$DONE" >> $env:GITHUB_OUPUT From ab5d110b795c758578ed9d4be63c915728c5ed77 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 02:13:02 +0000 Subject: [PATCH 26/38] tryig to get needs output from get_Ready --- .github/workflows/getlabels.yaml | 9 ++++----- .github/workflows/orion_status.yaml | 5 +++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index 020e937e45..15fc204c2a 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -2,6 +2,10 @@ name: Get Labels on: workflow_call: + outputs: + state: + description: "The return state of Stage (true/false)" + value: ${{ jobs.getlabels.outputs.state }} inputs: pr_number: required: true @@ -13,11 +17,6 @@ on: required: true type: string - outputs: - state: - description: "The return state of Stage (true/false)" - value: ${{ jobs.getlabels.outputs.state }} - jobs: getlabels: diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index e331411734..b3c76a34dc 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -30,8 +30,9 @@ jobs: exit 1 fi - get_Building: + get_Building: uses: ./.github/workflows/getlabels.yaml + needs: Ready with: pr_number: ${{ inputs.pr_number }} max_runtime: 40 @@ -40,7 +41,7 @@ jobs: Building: runs-on: ubuntu-latest - needs: [Ready, get_Building] + needs: get_Building steps: - run: | if [[ ${{ needs.get_Building.outputs.state }} ]]; then From 35c4877f2a953035a9fcd25f8f5328d1b3034db2 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 02:26:54 +0000 Subject: [PATCH 27/38] still not getting outputs --- .github/workflows/getlabels.yaml | 2 +- .github/workflows/orion_status.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index 15fc204c2a..8789da3cdb 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -54,4 +54,4 @@ jobs: fi done echo "state=$DONE" - echo "state=$DONE" >> $env:GITHUB_OUPUT + echo "state=$DONE" >> "${GITHUB_OUPUT}" diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index b3c76a34dc..d607f1725e 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -51,6 +51,7 @@ jobs: get_Running: uses: ./.github/workflows/getlabels.yaml + needs: Building with: pr_number: ${{ inputs.pr_number }} max_runtime: 60 @@ -59,7 +60,7 @@ jobs: Running: runs-on: ubuntu-latest - needs: [Building, get_Running] + needs: get_Running steps: - run: | if [[ ${{ needs.get_Running.outputs.state }} ]]; then From 725e5258559a8b6a0f6d95ff592aa31315656170 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 02:34:03 +0000 Subject: [PATCH 28/38] quotes on GITHUB_OUTPUT --- .github/workflows/getlabels.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index 8789da3cdb..7f9e1c0902 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -54,4 +54,4 @@ jobs: fi done echo "state=$DONE" - echo "state=$DONE" >> "${GITHUB_OUPUT}" + echo "state=$DONE" >> ${GITHUB_OUPUT} From 461297d10f29a920b5c5e4b9394d0de8a40f38e9 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 02:49:06 +0000 Subject: [PATCH 29/38] trying crazy Sys IO --- .github/workflows/getlabels.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index 7f9e1c0902..c8193482e3 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -54,4 +54,7 @@ jobs: fi done echo "state=$DONE" - echo "state=$DONE" >> ${GITHUB_OUPUT} + var file = Environment.GetEnvironmentVariable("GITHUB_OUTPUT"); + var content = System.IO.File.ReadAllText(file); + System.IO.File.WriteAllText(file, content + "state=${DONE}" + "\n"); + # echo "state=$DONE" >> ${GITHUB_OUPUT} From 9bdf6f51c443bfd3a2249c54e4d0599baed27728 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 03:07:41 +0000 Subject: [PATCH 30/38] addeing yml file --- .github/workflows/getlabels.yml | 57 +++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/getlabels.yml diff --git a/.github/workflows/getlabels.yml b/.github/workflows/getlabels.yml new file mode 100644 index 0000000000..e8ebc733f1 --- /dev/null +++ b/.github/workflows/getlabels.yml @@ -0,0 +1,57 @@ +name: Get Labels + +on: + workflow_call: + outputs: + state: + description: "The return state of Stage (true/false)" + value: ${{ jobs.getlabels.outputs.state }} + inputs: + pr_number: + required: true + type: string + max_runtime: + required: false + type: string + stage: + required: true + type: string + +jobs: + + getlabels: + runs-on: ubuntu-latest + outputs: + state: ${{ steps.id.outputs.state }} + steps: + - name: Get Label Steps + id: id + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + OWNER: ${{ github.repository_owner }} + REPO_NAME: ${{ github.event.repository.name }} + PULL_REQUEST_NUMBER: ${{ inputs.pr_number }} + STAGE: ${{ inputs.stage }} + MAX_TIME: ${{ inputs.max_runtime }} + run: | + DONE=false + count=0 + until false + do + echo "gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name'" + LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" + LABELS=$(echo "$LABELS1" | tr '\n' ' ') + check_label="CI-Orion-${STAGE}" + if [[ "${LABELS}" == *"${check_label}"* ]]; then + DONE=true + break + fi + sleep 10m + count=$((count+10)) + if [[ ${count} -gt ${MAX_TIME} ]]; then + DONE=false + break + fi + done + echo "state=${DONE}" + echo "state=${DONE}" >> ${GITHUB_OUPUT} From 3e7a55982e36e55f30cf57deade49e036c9fae36 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 03:08:22 +0000 Subject: [PATCH 31/38] remove yml file --- .github/workflows/getlabels.yml | 57 --------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 .github/workflows/getlabels.yml diff --git a/.github/workflows/getlabels.yml b/.github/workflows/getlabels.yml deleted file mode 100644 index e8ebc733f1..0000000000 --- a/.github/workflows/getlabels.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Get Labels - -on: - workflow_call: - outputs: - state: - description: "The return state of Stage (true/false)" - value: ${{ jobs.getlabels.outputs.state }} - inputs: - pr_number: - required: true - type: string - max_runtime: - required: false - type: string - stage: - required: true - type: string - -jobs: - - getlabels: - runs-on: ubuntu-latest - outputs: - state: ${{ steps.id.outputs.state }} - steps: - - name: Get Label Steps - id: id - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - OWNER: ${{ github.repository_owner }} - REPO_NAME: ${{ github.event.repository.name }} - PULL_REQUEST_NUMBER: ${{ inputs.pr_number }} - STAGE: ${{ inputs.stage }} - MAX_TIME: ${{ inputs.max_runtime }} - run: | - DONE=false - count=0 - until false - do - echo "gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name'" - LABELS1="$(gh api repos/$OWNER/$REPO_NAME/pulls/$PULL_REQUEST_NUMBER --jq '.labels.[].name')" - LABELS=$(echo "$LABELS1" | tr '\n' ' ') - check_label="CI-Orion-${STAGE}" - if [[ "${LABELS}" == *"${check_label}"* ]]; then - DONE=true - break - fi - sleep 10m - count=$((count+10)) - if [[ ${count} -gt ${MAX_TIME} ]]; then - DONE=false - break - fi - done - echo "state=${DONE}" - echo "state=${DONE}" >> ${GITHUB_OUPUT} From b6566149215f90e4afb000d6390b60754185ed00 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 03:09:13 +0000 Subject: [PATCH 32/38] added () on DONE --- .github/workflows/getlabels.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index c8193482e3..e8ebc733f1 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -53,8 +53,5 @@ jobs: break fi done - echo "state=$DONE" - var file = Environment.GetEnvironmentVariable("GITHUB_OUTPUT"); - var content = System.IO.File.ReadAllText(file); - System.IO.File.WriteAllText(file, content + "state=${DONE}" + "\n"); - # echo "state=$DONE" >> ${GITHUB_OUPUT} + echo "state=${DONE}" + echo "state=${DONE}" >> ${GITHUB_OUPUT} From ed3429e3f3c1cf4a0258b0d7f14c256ef71e1c3c Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 03:16:05 +0000 Subject: [PATCH 33/38] adding env back to GITHUB_OUPUT --- .github/workflows/getlabels.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index e8ebc733f1..b861658a85 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -54,4 +54,4 @@ jobs: fi done echo "state=${DONE}" - echo "state=${DONE}" >> ${GITHUB_OUPUT} + echo "state=${DONE}" >> $env:GITHUB_OUTPUT From 00e92e286387b4bca03285420a93b47ec1844f31 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 03:24:48 +0000 Subject: [PATCH 34/38] added read write permissions to reuse --- .github/workflows/getlabels.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index b861658a85..156ee222a5 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -17,6 +17,10 @@ on: required: true type: string +permissions: + contents: read + packages: write + jobs: getlabels: @@ -54,4 +58,4 @@ jobs: fi done echo "state=${DONE}" - echo "state=${DONE}" >> $env:GITHUB_OUTPUT + echo "state=${DONE}" >> $GITHUB_OUTPUT From 7cda4501f36017947fe8564011c9cde106e38ee0 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 03:34:14 +0000 Subject: [PATCH 35/38] fixed logic in status workflow for on set --- .github/workflows/orion_status.yaml | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index d607f1725e..3be30a6239 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -13,7 +13,7 @@ on: jobs: get_Ready: - uses: ./.github/workflows/getlabels.yaml + uses: ./.github/workflows/getlabels.yml with: pr_number: ${{ inputs.pr_number }} max_runtime: 20 @@ -25,9 +25,11 @@ jobs: needs: get_Ready steps: - run: | - if [[ ${{ needs.get_Ready.outputs.state }} ]]; then - echo "Waiting for Ready State timmed out" + if [[ "${{ needs.get_Ready.outputs.state }}" == "false" ]]; then + echo "Ready Timmed out" exit 1 + elif [[ "${{ needs.get_Ready.outputs.state }}" == "true" ]]; then + echo "Ready Set" fi get_Building: @@ -44,10 +46,12 @@ jobs: needs: get_Building steps: - run: | - if [[ ${{ needs.get_Building.outputs.state }} ]]; then - echo "Waiting for Ready State timmed out" + if [[ "${{ needs.get_Building.outputs.state }}" == "false" ]]; then + echo "Building Timmed out" exit 1 - fi + elif [[ "${{ needs.get_Building.outputs.state }}" == "true" ]]; then + echo "Building Set" + fi get_Running: uses: ./.github/workflows/getlabels.yaml @@ -63,7 +67,9 @@ jobs: needs: get_Running steps: - run: | - if [[ ${{ needs.get_Running.outputs.state }} ]]; then - echo "Waiting for Ready State timmed out" + if [[ "${{ needs.get_Running.outputs.state }}" == "false" ]]; then + echo "Running Timmed out" exit 1 + elif [[ "${{ needs.get_Running.outputs.state }}" == "true" ]]; then + echo "Running Set" fi \ No newline at end of file From 522e4e30d4f224e4cc81cff42ef29ac699b784cf Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 03:37:30 +0000 Subject: [PATCH 36/38] noop on getlables --- .github/workflows/getlabels.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/getlabels.yaml b/.github/workflows/getlabels.yaml index 156ee222a5..cff128217d 100644 --- a/.github/workflows/getlabels.yaml +++ b/.github/workflows/getlabels.yaml @@ -16,7 +16,6 @@ on: stage: required: true type: string - permissions: contents: read packages: write From 752210cfed4f4e0b50f7e5123c70b9b000745348 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 03:39:26 +0000 Subject: [PATCH 37/38] issue with orion status --- .github/workflows/orion_status.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index 3be30a6239..a9ce1def1b 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -25,10 +25,10 @@ jobs: needs: get_Ready steps: - run: | - if [[ "${{ needs.get_Ready.outputs.state }}" == "false" ]]; then + if [[ ${{ needs.get_Ready.outputs.state }} == "false" ]]; then echo "Ready Timmed out" exit 1 - elif [[ "${{ needs.get_Ready.outputs.state }}" == "true" ]]; then + elif [[ ${{ needs.get_Ready.outputs.state }} == "true" ]]; then echo "Ready Set" fi From 56b6a5f2d2bf8c84b53739fe64afb443b6ae76b7 Mon Sep 17 00:00:00 2001 From: TerrenceMcGuinness-NOAA Date: Sat, 21 Oct 2023 03:42:10 +0000 Subject: [PATCH 38/38] misspelled yaml as yml --- .github/workflows/orion_status.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/orion_status.yaml b/.github/workflows/orion_status.yaml index a9ce1def1b..76d5571271 100644 --- a/.github/workflows/orion_status.yaml +++ b/.github/workflows/orion_status.yaml @@ -13,7 +13,7 @@ on: jobs: get_Ready: - uses: ./.github/workflows/getlabels.yml + uses: ./.github/workflows/getlabels.yaml with: pr_number: ${{ inputs.pr_number }} max_runtime: 20 @@ -25,10 +25,10 @@ jobs: needs: get_Ready steps: - run: | - if [[ ${{ needs.get_Ready.outputs.state }} == "false" ]]; then + if [[ "${{ needs.get_Ready.outputs.state }}" == "false" ]]; then echo "Ready Timmed out" exit 1 - elif [[ ${{ needs.get_Ready.outputs.state }} == "true" ]]; then + elif [[ "${{ needs.get_Ready.outputs.state }}" == "true" ]]; then echo "Ready Set" fi