ci: remove production deploy job

This commit is contained in:
Víctor Falcón 2026-06-20 20:03:25 +02:00
parent 57747ef34c
commit 59bd0c3012
1 changed files with 0 additions and 79 deletions

View File

@ -549,82 +549,3 @@ jobs:
"$IMAGE@$AMD64_DIGEST" \
"$IMAGE@$ARM64_DIGEST"
done <<< "$TAGS"
deploy:
runs-on: ubuntu-latest
needs: [tests, linter, static-analysis, performance-tests, changes]
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && needs.changes.outputs.code == 'true'
env:
SENTRY_RELEASE: whisper-money@${{ github.sha }}
concurrency:
group: production-deploy-main
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check if this is the latest main commit
id: deploy_guard
run: |
latest_main_sha=$(git ls-remote origin refs/heads/main | cut -f1)
echo "Current workflow SHA: ${{ github.sha }}"
echo "Latest main SHA: $latest_main_sha"
if [ -z "$latest_main_sha" ]; then
echo "Unable to determine the latest main SHA."
exit 1
fi
if [ "$latest_main_sha" != "${{ github.sha }}" ]; then
echo "This workflow is not for the latest commit on main. Skipping deploy."
echo "should_deploy=false" >> "$GITHUB_OUTPUT"
exit 0
fi
echo "This workflow is for the latest commit on main. Proceeding with deploy."
echo "should_deploy=true" >> "$GITHUB_OUTPUT"
- name: Trigger deployment
if: steps.deploy_guard.outputs.should_deploy == 'true'
run: |
# Fire the webhook and let curl own the timeouts/retries: --max-time
# caps each attempt so the job can't hang, and --retry-all-errors
# turns a timed-out attempt into the next retry.
curl --fail \
--connect-timeout 10 \
--max-time 15 \
--retry 3 \
--retry-delay 10 \
--retry-all-errors \
-i -X GET "${{ secrets.COOLIFY_WEBHOOK_URL }}"
- name: Install Sentry CLI
if: steps.deploy_guard.outputs.should_deploy == 'true'
run: curl -sL https://sentry.io/get-cli/ | bash
- name: Create Sentry release
if: steps.deploy_guard.outputs.should_deploy == 'true'
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
run: |
if ! sentry-cli releases info "$SENTRY_RELEASE" >/dev/null 2>&1; then
sentry-cli releases new "$SENTRY_RELEASE"
fi
sentry-cli releases set-commits "$SENTRY_RELEASE" --auto --ignore-missing
sentry-cli releases finalize "$SENTRY_RELEASE"
- name: Mark Sentry release deployed
if: steps.deploy_guard.outputs.should_deploy == 'true'
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
run: sentry-cli releases deploys "$SENTRY_RELEASE" new -e production
- name: Deployment skipped
if: steps.deploy_guard.outputs.should_deploy == 'false'
run: echo "Skipped deployment because a newer commit is already on main."