From 7c8bece223b69d93d4344d1761e247f25fb2afea Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Wed, 12 Jul 2023 17:44:43 +0800 Subject: [PATCH 01/14] test --- .github/workflows/master-pr-closed.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/master-pr-closed.yml diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml new file mode 100644 index 0000000..fb322de --- /dev/null +++ b/.github/workflows/master-pr-closed.yml @@ -0,0 +1,21 @@ +name: Test2 + +on: + pull_request: + branches: + - staging + types: + - opened + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Set empty string + id: set + run: | + echo "##[set-output name=targets;]$(echo '')" + + - name: debug + run: | + echo ${{ steps.set.outputs.targets }} \ No newline at end of file From 9399161c4c3fcfaeadc754938f49fce792384a53 Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Wed, 12 Jul 2023 17:48:35 +0800 Subject: [PATCH 02/14] test --- .github/workflows/master-pr-closed.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml index fb322de..7d720c9 100644 --- a/.github/workflows/master-pr-closed.yml +++ b/.github/workflows/master-pr-closed.yml @@ -18,4 +18,14 @@ jobs: - name: debug run: | - echo ${{ steps.set.outputs.targets }} \ No newline at end of file + echo ${{ steps.set.outputs.targets }} + + - name: debug 2 + if: ${{ steps.set.outputs.targets == '' }} + run: | + echo "empty string" + + - name: debug 3 + if: ${{ steps.set.outputs.targets == '0' }} + run: | + echo "empty string with 0 string" \ No newline at end of file From 4b4207b326f4ce4a0e0ad7355944e875fa64694a Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Wed, 12 Jul 2023 17:49:18 +0800 Subject: [PATCH 03/14] test --- .github/workflows/master-pr-closed.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml index 7d720c9..ae4af76 100644 --- a/.github/workflows/master-pr-closed.yml +++ b/.github/workflows/master-pr-closed.yml @@ -6,6 +6,7 @@ on: - staging types: - opened + - synchronize jobs: test: From 55f282d9639f5ddc36cccd33042c7f933a0c9967 Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Wed, 12 Jul 2023 17:53:02 +0800 Subject: [PATCH 04/14] test --- .github/workflows/master-pr-closed.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml index ae4af76..c57bee5 100644 --- a/.github/workflows/master-pr-closed.yml +++ b/.github/workflows/master-pr-closed.yml @@ -23,10 +23,14 @@ jobs: - name: debug 2 if: ${{ steps.set.outputs.targets == '' }} - run: | - echo "empty string" + run: exit 1 + - name: debug 3 if: ${{ steps.set.outputs.targets == '0' }} run: | - echo "empty string with 0 string" \ No newline at end of file + echo "empty string with 0 string" + + - name: final + run: | + echo "final step" \ No newline at end of file From ecabc25b33152d9e25cbfe7855fa7e83cb8a7f44 Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Wed, 12 Jul 2023 17:54:22 +0800 Subject: [PATCH 05/14] test --- .github/workflows/master-pr-closed.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml index c57bee5..e63c497 100644 --- a/.github/workflows/master-pr-closed.yml +++ b/.github/workflows/master-pr-closed.yml @@ -33,4 +33,12 @@ jobs: - name: final run: | - echo "final step" \ No newline at end of file + echo "final step" + + sequel: + runs-on: ubuntu-latest + needs: test + steps: + - name: debug + run: | + echo "sequel" \ No newline at end of file From 1c17faa60bdda252790bc4079bbe4a4666e29430 Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Wed, 12 Jul 2023 17:55:13 +0800 Subject: [PATCH 06/14] test --- .github/workflows/master-pr-closed.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml index e63c497..2f6ee41 100644 --- a/.github/workflows/master-pr-closed.yml +++ b/.github/workflows/master-pr-closed.yml @@ -23,8 +23,7 @@ jobs: - name: debug 2 if: ${{ steps.set.outputs.targets == '' }} - run: exit 1 - + run: exit 0 - name: debug 3 if: ${{ steps.set.outputs.targets == '0' }} From 36b7597e712633e3666046334a62a36b05672f47 Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Wed, 12 Jul 2023 17:58:26 +0800 Subject: [PATCH 07/14] test --- .github/workflows/master-pr-closed.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml index 2f6ee41..3df0c4d 100644 --- a/.github/workflows/master-pr-closed.yml +++ b/.github/workflows/master-pr-closed.yml @@ -9,24 +9,31 @@ on: - synchronize jobs: - test: + momo: runs-on: ubuntu-latest + outputs: + targets: ${{ steps.set.outputs.targets }} steps: - name: Set empty string id: set run: | echo "##[set-output name=targets;]$(echo '')" + test: + runs-on: ubuntu-latest + needs: momo + if: ${{ needs.momo.outputs.targets == '' }} + steps: - name: debug run: | - echo ${{ steps.set.outputs.targets }} + echo ${{ needs.momo.outputs.targets }} - name: debug 2 - if: ${{ steps.set.outputs.targets == '' }} + if: ${{ needs.momo.outputs.targets == '' }} run: exit 0 - name: debug 3 - if: ${{ steps.set.outputs.targets == '0' }} + if: ${{ needs.momo.outputs.targets == '0' }} run: | echo "empty string with 0 string" From dffd74d3914c603395cbfcdd605e9df378852b68 Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Wed, 12 Jul 2023 18:00:20 +0800 Subject: [PATCH 08/14] test --- .github/workflows/master-pr-closed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml index 3df0c4d..6e1d8fa 100644 --- a/.github/workflows/master-pr-closed.yml +++ b/.github/workflows/master-pr-closed.yml @@ -17,7 +17,7 @@ jobs: - name: Set empty string id: set run: | - echo "##[set-output name=targets;]$(echo '')" + echo "##[set-output name=targets;]$(echo '')" >> $GITHUB_OUTPUT test: runs-on: ubuntu-latest From 622f122b1198fe4ee6373f6c2632a9cf754140ac Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Thu, 13 Jul 2023 09:03:17 +0800 Subject: [PATCH 09/14] test --- .github/workflows/master-pr-closed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml index 6e1d8fa..fb0ae97 100644 --- a/.github/workflows/master-pr-closed.yml +++ b/.github/workflows/master-pr-closed.yml @@ -17,7 +17,7 @@ jobs: - name: Set empty string id: set run: | - echo "##[set-output name=targets;]$(echo '')" >> $GITHUB_OUTPUT + echo "targets=''" >> $GITHUB_OUTPUT test: runs-on: ubuntu-latest From 7057aaaa9372a8b74c5ad060524f561e3f5d3ef8 Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Thu, 13 Jul 2023 09:06:58 +0800 Subject: [PATCH 10/14] test --- .github/workflows/master-pr-closed.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml index fb0ae97..9f4a622 100644 --- a/.github/workflows/master-pr-closed.yml +++ b/.github/workflows/master-pr-closed.yml @@ -16,8 +16,10 @@ jobs: steps: - name: Set empty string id: set + shell: bash run: | - echo "targets=''" >> $GITHUB_OUTPUT + targets="" + echo targets >> $GITHUB_OUTPUT test: runs-on: ubuntu-latest From 073a1cb5291e8c679deb9c94187f38a284924edb Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Thu, 13 Jul 2023 09:08:03 +0800 Subject: [PATCH 11/14] test --- .github/workflows/master-pr-closed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml index 9f4a622..3e45bfc 100644 --- a/.github/workflows/master-pr-closed.yml +++ b/.github/workflows/master-pr-closed.yml @@ -19,7 +19,7 @@ jobs: shell: bash run: | targets="" - echo targets >> $GITHUB_OUTPUT + echo "targets" >> $GITHUB_OUTPUT test: runs-on: ubuntu-latest From c883ac30a430c74f4c5f2063d4bfb63111689ff1 Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Thu, 13 Jul 2023 09:08:53 +0800 Subject: [PATCH 12/14] test --- .github/workflows/master-pr-closed.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml index 3e45bfc..3468b51 100644 --- a/.github/workflows/master-pr-closed.yml +++ b/.github/workflows/master-pr-closed.yml @@ -18,8 +18,8 @@ jobs: id: set shell: bash run: | - targets="" - echo "targets" >> $GITHUB_OUTPUT + targets="test" + echo "targets=${targets}" >> $GITHUB_OUTPUT test: runs-on: ubuntu-latest From 2ef426b1e01bf86704ab8d877b648b59179ec779 Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Thu, 13 Jul 2023 09:13:59 +0800 Subject: [PATCH 13/14] test --- .github/workflows/master-pr-closed.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml index 3468b51..f7b73f7 100644 --- a/.github/workflows/master-pr-closed.yml +++ b/.github/workflows/master-pr-closed.yml @@ -24,7 +24,6 @@ jobs: test: runs-on: ubuntu-latest needs: momo - if: ${{ needs.momo.outputs.targets == '' }} steps: - name: debug run: | From 4482c718a86eeb2e7128bf253bf8dddb110d5cc3 Mon Sep 17 00:00:00 2001 From: Ray Foo Date: Thu, 13 Jul 2023 09:15:16 +0800 Subject: [PATCH 14/14] test --- .github/workflows/master-pr-closed.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/master-pr-closed.yml b/.github/workflows/master-pr-closed.yml index f7b73f7..8de3a34 100644 --- a/.github/workflows/master-pr-closed.yml +++ b/.github/workflows/master-pr-closed.yml @@ -24,6 +24,7 @@ jobs: test: runs-on: ubuntu-latest needs: momo + if: ${{ needs.momo.outputs.targets != '' }} steps: - name: debug run: |