Skip to content

Commit d0dff08

Browse files
committed
ci: fix decide-deploy output handling
1 parent cde11d9 commit d0dff08

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -145,20 +145,21 @@ jobs:
145145
run: |
146146
set -euo pipefail
147147
148+
should_deploy=false
149+
148150
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
149-
echo "Manual dispatch requested; deploying."
150-
echo "should_deploy=true" >> "$GITHUB_OUTPUT"
151-
exit 0
151+
should_deploy=true
152+
elif [ "${{ needs.detect-changes.outputs.deployable }}" = "true" ]; then
153+
should_deploy=true
152154
fi
153155
154-
if [ "${{ needs.detect-changes.outputs.deployable }}" = "true" ]; then
155-
echo "Deployable files changed since last successful deploy; deploying."
156-
echo "should_deploy=true" >> "$GITHUB_OUTPUT"
157-
exit 0
156+
if [ "$should_deploy" = "true" ]; then
157+
echo "Deploy requested; deploying."
158+
else
159+
echo "No deployable files changed since last successful deploy; skipping."
158160
fi
159161
160-
echo "No deployable files changed since last successful deploy; skipping."
161-
echo "should_deploy=false" >> "$GITHUB_OUTPUT"
162+
echo "should_deploy=$should_deploy" >> "$GITHUB_OUTPUT"
162163
163164
# Quality gate: four parallel jobs replacing the former sequential quality-gate.
164165
# Only the test job needs a real Postgres; the others use a dummy DATABASE_URL

0 commit comments

Comments
 (0)