From b17e0ea1cbac07a09ea34f1c415ee73c4ae925ab Mon Sep 17 00:00:00 2001 From: Chris Lin <99268912+chrislin22@users.noreply.github.com> Date: Fri, 9 Jun 2023 14:48:57 -0400 Subject: [PATCH 01/13] added workflow done --- .github/workflows/nested-matrix.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/nested-matrix.yaml b/.github/workflows/nested-matrix.yaml index 481192e..8d2ad75 100644 --- a/.github/workflows/nested-matrix.yaml +++ b/.github/workflows/nested-matrix.yaml @@ -2,6 +2,9 @@ name: nested matrix env: BATCH_SIZE: 2 on: + pull_request: + branches: [ main ] + workflow_dispatch: jobs: @@ -54,3 +57,9 @@ jobs: echo $c done + nested-wf-done: + runs-on: ubuntu-latest + needs: [build] + steps: + - name: workflow done + run: echo "workflow done" \ No newline at end of file From da7288cf683147a3c52e9673beb885c006a09ebe Mon Sep 17 00:00:00 2001 From: Chris Lin <99268912+chrislin22@users.noreply.github.com> Date: Fri, 9 Jun 2023 14:53:06 -0400 Subject: [PATCH 02/13] branches: [ my-protected ] --- .github/workflows/nested-matrix.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nested-matrix.yaml b/.github/workflows/nested-matrix.yaml index 8d2ad75..7987936 100644 --- a/.github/workflows/nested-matrix.yaml +++ b/.github/workflows/nested-matrix.yaml @@ -3,7 +3,7 @@ env: BATCH_SIZE: 2 on: pull_request: - branches: [ main ] + branches: [ my-protected ] workflow_dispatch: From ddb2726e68f37416f43c8f59e03359eef099c007 Mon Sep 17 00:00:00 2001 From: Chris Lin <99268912+chrislin22@users.noreply.github.com> Date: Fri, 9 Jun 2023 14:58:54 -0400 Subject: [PATCH 03/13] exist 22 --- .github/workflows/nested-matrix.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nested-matrix.yaml b/.github/workflows/nested-matrix.yaml index 7987936..e1ff8ac 100644 --- a/.github/workflows/nested-matrix.yaml +++ b/.github/workflows/nested-matrix.yaml @@ -38,6 +38,7 @@ jobs: echo "$cluster_array_json" # set output for the job echo "batch_matrix=[ $cluster_array_json ]" >> $GITHUB_OUTPUT + exist 22 build: runs-on: ubuntu-latest From c612d0bf46d21a1f1eb5624e56d49e720e8ac112 Mon Sep 17 00:00:00 2001 From: Chris Lin <99268912+chrislin22@users.noreply.github.com> Date: Fri, 9 Jun 2023 15:01:39 -0400 Subject: [PATCH 04/13] echo "workflow done"; exist 22 --- .github/workflows/nested-matrix.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nested-matrix.yaml b/.github/workflows/nested-matrix.yaml index e1ff8ac..0db7fe3 100644 --- a/.github/workflows/nested-matrix.yaml +++ b/.github/workflows/nested-matrix.yaml @@ -38,7 +38,7 @@ jobs: echo "$cluster_array_json" # set output for the job echo "batch_matrix=[ $cluster_array_json ]" >> $GITHUB_OUTPUT - exist 22 + build: runs-on: ubuntu-latest @@ -63,4 +63,4 @@ jobs: needs: [build] steps: - name: workflow done - run: echo "workflow done" \ No newline at end of file + run: echo "workflow done"; exist 22 \ No newline at end of file From 0d9c1263df991fa7caecaaf6432d551b1d6796af Mon Sep 17 00:00:00 2001 From: Chris Lin <99268912+chrislin22@users.noreply.github.com> Date: Fri, 9 Jun 2023 15:18:16 -0400 Subject: [PATCH 05/13] exit $(failure) --- .github/workflows/nested-matrix.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nested-matrix.yaml b/.github/workflows/nested-matrix.yaml index 0db7fe3..48a2033 100644 --- a/.github/workflows/nested-matrix.yaml +++ b/.github/workflows/nested-matrix.yaml @@ -62,5 +62,5 @@ jobs: runs-on: ubuntu-latest needs: [build] steps: - - name: workflow done - run: echo "workflow done"; exist 22 \ No newline at end of file + - name: Check previous job status + run: exit $(failure) \ No newline at end of file From 7fd6d137b3fb70edb47e8bf50f0ac64e8475b239 Mon Sep 17 00:00:00 2001 From: Chris Lin <99268912+chrislin22@users.noreply.github.com> Date: Fri, 9 Jun 2023 15:19:55 -0400 Subject: [PATCH 06/13] exit $(failure()) --- .github/workflows/nested-matrix.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nested-matrix.yaml b/.github/workflows/nested-matrix.yaml index 48a2033..3864659 100644 --- a/.github/workflows/nested-matrix.yaml +++ b/.github/workflows/nested-matrix.yaml @@ -63,4 +63,4 @@ jobs: needs: [build] steps: - name: Check previous job status - run: exit $(failure) \ No newline at end of file + run: exit $(failure()) \ No newline at end of file From 8ea0d1f409b06f06c71c81b6997c5566c1e5f4ec Mon Sep 17 00:00:00 2001 From: Chris Lin <99268912+chrislin22@users.noreply.github.com> Date: Fri, 9 Jun 2023 15:25:39 -0400 Subject: [PATCH 07/13] exit ${{ failure() }} --- .github/workflows/nested-matrix.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nested-matrix.yaml b/.github/workflows/nested-matrix.yaml index 3864659..be49290 100644 --- a/.github/workflows/nested-matrix.yaml +++ b/.github/workflows/nested-matrix.yaml @@ -63,4 +63,6 @@ jobs: needs: [build] steps: - name: Check previous job status - run: exit $(failure()) \ No newline at end of file + run: | + echo "---[${{ failure() }}]---" + exit ${{ failure() }} \ No newline at end of file From 3a6c8a704fc2415c860474e6b44c565044cb5293 Mon Sep 17 00:00:00 2001 From: Chris Lin <99268912+chrislin22@users.noreply.github.com> Date: Fri, 9 Jun 2023 15:30:55 -0400 Subject: [PATCH 08/13] if: ${{ always() }} --- .github/workflows/nested-matrix.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nested-matrix.yaml b/.github/workflows/nested-matrix.yaml index be49290..acacf84 100644 --- a/.github/workflows/nested-matrix.yaml +++ b/.github/workflows/nested-matrix.yaml @@ -59,10 +59,10 @@ jobs: done nested-wf-done: + if: ${{ always() }} runs-on: ubuntu-latest needs: [build] steps: - name: Check previous job status run: | - echo "---[${{ failure() }}]---" - exit ${{ failure() }} \ No newline at end of file + echo "yes" From b235fc570a72a599de6a2769adca3e0660087e18 Mon Sep 17 00:00:00 2001 From: Chris Lin <99268912+chrislin22@users.noreply.github.com> Date: Fri, 9 Jun 2023 15:33:34 -0400 Subject: [PATCH 09/13] if: ${{ failure() }} --- .github/workflows/nested-matrix.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nested-matrix.yaml b/.github/workflows/nested-matrix.yaml index acacf84..75e6941 100644 --- a/.github/workflows/nested-matrix.yaml +++ b/.github/workflows/nested-matrix.yaml @@ -38,7 +38,7 @@ jobs: echo "$cluster_array_json" # set output for the job echo "batch_matrix=[ $cluster_array_json ]" >> $GITHUB_OUTPUT - + exit 11 build: runs-on: ubuntu-latest @@ -59,7 +59,7 @@ jobs: done nested-wf-done: - if: ${{ always() }} + if: ${{ failure() }} runs-on: ubuntu-latest needs: [build] steps: From 80420c12743d58e44201ddf276e82e18da805a30 Mon Sep 17 00:00:00 2001 From: Chris Lin <99268912+chrislin22@users.noreply.github.com> Date: Fri, 9 Jun 2023 15:59:49 -0400 Subject: [PATCH 10/13] exit 11 --- .github/workflows/nested-matrix.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nested-matrix.yaml b/.github/workflows/nested-matrix.yaml index 75e6941..2fc4f8c 100644 --- a/.github/workflows/nested-matrix.yaml +++ b/.github/workflows/nested-matrix.yaml @@ -65,4 +65,5 @@ jobs: steps: - name: Check previous job status run: | - echo "yes" + echo "previous job failed" + exit 11 From 624749295ad7ddee3662206425ab04c6c97816ab Mon Sep 17 00:00:00 2001 From: Chris Lin <99268912+chrislin22@users.noreply.github.com> Date: Fri, 9 Jun 2023 16:01:16 -0400 Subject: [PATCH 11/13] ok case --- .github/workflows/nested-matrix.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nested-matrix.yaml b/.github/workflows/nested-matrix.yaml index 2fc4f8c..a2016e2 100644 --- a/.github/workflows/nested-matrix.yaml +++ b/.github/workflows/nested-matrix.yaml @@ -38,7 +38,7 @@ jobs: echo "$cluster_array_json" # set output for the job echo "batch_matrix=[ $cluster_array_json ]" >> $GITHUB_OUTPUT - exit 11 + build: runs-on: ubuntu-latest From 476554318fe659fd2459f900551d7ffdcc80b38f Mon Sep 17 00:00:00 2001 From: Chris Lin <99268912+chrislin22@users.noreply.github.com> Date: Fri, 9 Jun 2023 16:37:29 -0400 Subject: [PATCH 12/13] exit 22 --- .github/workflows/nested-matrix.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/nested-matrix.yaml b/.github/workflows/nested-matrix.yaml index a2016e2..8b13607 100644 --- a/.github/workflows/nested-matrix.yaml +++ b/.github/workflows/nested-matrix.yaml @@ -57,6 +57,7 @@ jobs: for c in ${clusters}; do echo $c done + exit 22 nested-wf-done: if: ${{ failure() }} From 9b0572d9985434c5f7ad8076e9bf3e4d6bc09392 Mon Sep 17 00:00:00 2001 From: Chris Lin <99268912+chrislin22@users.noreply.github.com> Date: Fri, 9 Jun 2023 16:38:43 -0400 Subject: [PATCH 13/13] clean --- .github/workflows/nested-matrix.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/nested-matrix.yaml b/.github/workflows/nested-matrix.yaml index 8b13607..a2016e2 100644 --- a/.github/workflows/nested-matrix.yaml +++ b/.github/workflows/nested-matrix.yaml @@ -57,7 +57,6 @@ jobs: for c in ${clusters}; do echo $c done - exit 22 nested-wf-done: if: ${{ failure() }}