From b073a63c35e2292053e72063c6d8d1f4da53d3ba Mon Sep 17 00:00:00 2001 From: Rupert Barrow <48629751+RupertBarrow@users.noreply.github.com> Date: Tue, 28 Mar 2023 12:09:42 +0200 Subject: [PATCH 1/6] Update action.yml --- action.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index f3989ba..d06b7c7 100644 --- a/action.yml +++ b/action.yml @@ -73,5 +73,8 @@ runs: - name: Delete Scratch Org if: ${{ always() }} run: | - cci org scratch_delete '${{ inputs.org-name }}' + is_sandbox=`cci org info --org buildpack_eu --json | jq .is_sandbox`` + if [ ! $is_sandbox ]; then + cci org scratch_delete '${{ inputs.org-name }}' + endif shell: bash From 914fabeb88d992bad0735155422cff628b993f46 Mon Sep 17 00:00:00 2001 From: Rupert Barrow <48629751+RupertBarrow@users.noreply.github.com> Date: Tue, 28 Mar 2023 14:21:51 +0200 Subject: [PATCH 2/6] Update action.yml --- action.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/action.yml b/action.yml index d06b7c7..defcfc1 100644 --- a/action.yml +++ b/action.yml @@ -73,8 +73,7 @@ runs: - name: Delete Scratch Org if: ${{ always() }} run: | - is_sandbox=`cci org info --org buildpack_eu --json | jq .is_sandbox`` + is_sandbox=`cci org info --org buildpack_eu --json | jq .is_sandbox` if [ ! $is_sandbox ]; then - cci org scratch_delete '${{ inputs.org-name }}' - endif - shell: bash + cci org scratch_delete buildpack_eu + fi From 0eff7ba1c78812ef667b0c7145bccffb3804fa5f Mon Sep 17 00:00:00 2001 From: Rupert Barrow <48629751+RupertBarrow@users.noreply.github.com> Date: Tue, 28 Mar 2023 14:24:07 +0200 Subject: [PATCH 3/6] Update action.yml --- action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/action.yml b/action.yml index defcfc1..fda605a 100644 --- a/action.yml +++ b/action.yml @@ -72,6 +72,7 @@ runs: shell: bash - name: Delete Scratch Org if: ${{ always() }} + shell: bash run: | is_sandbox=`cci org info --org buildpack_eu --json | jq .is_sandbox` if [ ! $is_sandbox ]; then From 7ad04611ea56ee1a97a512a3b26ab9ed4cd8a5ef Mon Sep 17 00:00:00 2001 From: Rupert Barrow <48629751+RupertBarrow@users.noreply.github.com> Date: Tue, 28 Mar 2023 14:27:17 +0200 Subject: [PATCH 4/6] Update action.yml --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index fda605a..9106d89 100644 --- a/action.yml +++ b/action.yml @@ -74,7 +74,7 @@ runs: if: ${{ always() }} shell: bash run: | - is_sandbox=`cci org info --org buildpack_eu --json | jq .is_sandbox` + is_sandbox=`cci org info --org ${{ inputs.org-name }} --json | jq .is_sandbox` if [ ! $is_sandbox ]; then - cci org scratch_delete buildpack_eu + cci org scratch_delete ${{ inputs.org-name }} fi From c33dc8823591cd1c12d529bff9cc8b399de1f249 Mon Sep 17 00:00:00 2001 From: Rupert Barrow <48629751+RupertBarrow@users.noreply.github.com> Date: Tue, 28 Mar 2023 14:47:18 +0200 Subject: [PATCH 5/6] Update action.yml --- action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/action.yml b/action.yml index 9106d89..dd4e13f 100644 --- a/action.yml +++ b/action.yml @@ -38,17 +38,20 @@ runs: using: "composite" steps: - uses: actions/checkout@v3 + - name: Set Up CumulusCI uses: cumulus-actions/setup-cumulus@v1 with: cumulusci-version: '${{ inputs.cumulusci-version }}' sfdx-version: '${{ inputs.sfdx-version }}' + - name: Authorize Dev Hub uses: cumulus-actions/authorize-org@v1 with: auth-url: '${{ inputs.dev-hub-auth-url }}' org-name: dev-hub dev-hub: true + - name: Run Flow uses: RupertBarrow/cumulus-action-run-flow@main with: @@ -56,6 +59,7 @@ runs: org-name: '${{ inputs.org-name }}' flow-name: '${{ inputs.flow-name }}' flow-task-options: '${{ inputs.flow-task-options }}' + - name: Set Commit Status if: ${{ inputs.commit-status-regex && inputs.commit-status-name }} env: @@ -70,6 +74,7 @@ runs: -f description="${{ inputs.commit-status-description-prefix }}$STATUS" \ -f context='${{ inputs.commit-status-name }}' shell: bash + - name: Delete Scratch Org if: ${{ always() }} shell: bash From edbe7284abe7c8fc696c20922c8110c6f97a9ba7 Mon Sep 17 00:00:00 2001 From: Rupert Barrow <48629751+RupertBarrow@users.noreply.github.com> Date: Mon, 5 Jun 2023 19:01:11 +0200 Subject: [PATCH 6/6] fix: fixed issue with "cci org info --json" --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index dd4e13f..2b03589 100644 --- a/action.yml +++ b/action.yml @@ -79,7 +79,7 @@ runs: if: ${{ always() }} shell: bash run: | - is_sandbox=`cci org info --org ${{ inputs.org-name }} --json | jq .is_sandbox` - if [ ! $is_sandbox ]; then + is_scratch=`cci org info --org ${{ inputs.org-name }} --json | grep -v "Getting" | jq .is_scratch` + if [ $is_scratch ]; then cci org scratch_delete ${{ inputs.org-name }} fi