From e02616280e77b75d82338208b4fcb7dbd37b817e Mon Sep 17 00:00:00 2001 From: Shalabh Chaturvedi Date: Mon, 21 Aug 2023 13:15:22 -0700 Subject: [PATCH] Update prerun to return the name of the closed_branch_deployment (#150) --- actions/utils/prerun/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/actions/utils/prerun/action.yml b/actions/utils/prerun/action.yml index 349cf6a6..f190def5 100644 --- a/actions/utils/prerun/action.yml +++ b/actions/utils/prerun/action.yml @@ -4,6 +4,9 @@ outputs: result: description: "May be 'skip', to indicate the rest of the workflow should be skipped" value: ${{ steps.cleanup-closed-pr.outputs.result || steps.check-deployment-type.outputs.result}} + closed_branch_deployment: + description: "If this action closed a branch deployment, this field is set to the branch deployment name." + value: ${{ steps.cleanup-closed-pr.outputs.closed_branch_deployment }} runs: using: "composite" @@ -23,7 +26,8 @@ runs: # closed PRs, this marks the pr_status=closed and attaches the merge commit details. run: > echo "::notice title=Closed Pull Request::Marking branch deployment closed for this PR, will skip remaining workflow" && - $GITHUB_ACTION_PATH/../../../generated/gha/dagster-cloud.pex -m dagster_cloud_cli.entrypoint ci branch-deployment prerun_checkout_dir && + $GITHUB_ACTION_PATH/../../../generated/gha/dagster-cloud.pex -m dagster_cloud_cli.entrypoint ci branch-deployment prerun_checkout_dir > /tmp/closed-branch-deployment.txt && + echo "closed_branch_deployment=$(cat /tmp/closed-branch-deployment.txt)" >> $GITHUB_OUTPUT && echo 'result=skip' >> $GITHUB_OUTPUT shell: bash