Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,25 @@ jobs:
sparse-checkout: scripts
sparse-checkout-cone-mode: false

- name: Determine deploy targets
id: targets
run: |
TARGETS="${{ needs.build.outputs.heroku_targets }}"
HAS_MIGRATIONS="${{ needs.check-migrations.outputs.has_migrations }}"

if [ "$HAS_MIGRATIONS" == "false" ]; then
TARGETS=$(echo "$TARGETS" | sed 's/\brelease\b//' | xargs)
echo "⏭️ No migrations detected - skipping release phase"
else
echo "🗄️ Migrations detected (or check inconclusive) - including release phase"
fi

echo "Deploy targets: $TARGETS"
echo "targets=$TARGETS" >> "$GITHUB_OUTPUT"

- name: Deploy to Heroku
run: |
heroku container:release ${{ needs.build.outputs.heroku_targets }} -a ${{ env.HEROKU_APP }}
heroku container:release ${{ steps.targets.outputs.targets }} -a ${{ env.HEROKU_APP }}

- name: Wait for release to complete
run: ./scripts/wait_for_heroku_release.sh "${{ env.HEROKU_APP }}" 90
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:
# Mutable tag: {branch} (always points to latest build for this branch)
type=raw,value=${{ steps.vars.outputs.branch_slug }},priority=600
# Latest tag (only for production builds)
type=raw,value=latest,enable=${{ inputs.include_latest_tag }},priority=200
type=raw,value=latest,enable=${{ inputs.include_latest_tag || false }},priority=200
labels: |
# Override revision to match actual checkout (PR branch HEAD, not merge commit)
org.opencontainers.image.revision=${{ steps.vars.outputs.commit_sha }}
Expand Down
Loading