Skip to content

Commit

Permalink
Update prerun to return the name of the closed_branch_deployment (#150)
Browse files Browse the repository at this point in the history
  • Loading branch information
shalabhc authored Aug 21, 2023
1 parent b38fdd8 commit e026162
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion actions/utils/prerun/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand Down

0 comments on commit e026162

Please sign in to comment.