fix(ci): order sentry deploy after build (#309)

## Summary
- make the `deploy` job wait for `build-image` so Sentry release
creation finishes before deploy tracking runs
- keep the Sentry deploy marker on the same release name while removing
the race that caused `Release not found`
- add a focused regression test that asserts the workflow keeps this
dependency in place

## Testing
- php artisan test --compact tests/Feature/SentryConfigTest.php
This commit is contained in:
Víctor Falcón 2026-04-20 13:35:07 +01:00 committed by GitHub
parent 3500eaa469
commit bfe1af3c83
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View File

@ -291,7 +291,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
needs: [tests, linter, static-analysis, performance-tests]
needs: [build-image]
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
env:
SENTRY_RELEASE: whisper-money@${{ github.sha }}

View File

@ -3,3 +3,11 @@
it('binds the sentry release from the environment', function () {
expect(config('sentry.release'))->toBe(env('SENTRY_RELEASE'));
});
it('waits for the image build before marking a sentry deploy', function () {
$workflow = file_get_contents(base_path('.github/workflows/ci.yml'));
expect($workflow)
->toContain("deploy:\n runs-on: ubuntu-latest\n needs: [build-image]")
->toContain('run: sentry-cli releases deploys "$SENTRY_RELEASE" new -e production');
});