From dff0f8bc3229e542d341c9d453550b934953b65a Mon Sep 17 00:00:00 2001 From: Guido X Jansen Date: Wed, 4 Mar 2026 14:40:49 +0100 Subject: [PATCH] fix(ci): route deploy through lockfile sync to prevent stale lockfile (#132) Replace the two-step dispatch (deploy + sync in parallel) with a single dispatch to barazo-workspace's sync-lockfile workflow. The sync workflow regenerates the lockfile if needed, then triggers the deploy with the correct refs. This fixes a race condition where the deploy started with a stale workspace lockfile before the sync had committed the updated one, causing frozen-lockfile failures when new dependencies were added. --- .github/workflows/deploy-staging.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml index bd35ea0..f5ec2e1 100644 --- a/.github/workflows/deploy-staging.yml +++ b/.github/workflows/deploy-staging.yml @@ -12,23 +12,18 @@ jobs: name: Trigger Staging Deploy runs-on: ubuntu-latest steps: - - name: Dispatch to barazo-deploy + # Sync the workspace lockfile first, then let it trigger the deploy. + # This avoids a race condition where the deploy starts with a stale + # lockfile before the sync has committed the updated one. + - name: Sync lockfile and deploy uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1 with: token: ${{ secrets.DEPLOY_PAT }} - repository: barazo-forum/barazo-deploy - event-type: deploy-staging + repository: barazo-forum/barazo-workspace + event-type: sync-lockfile client-payload: | { "trigger_repo": "barazo-api", "api_ref": "${{ github.sha }}", "web_ref": "main" } - - - name: Sync workspace lockfile - continue-on-error: true - uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1 - with: - token: ${{ secrets.DEPLOY_PAT }} - repository: barazo-forum/barazo-workspace - event-type: sync-lockfile -- 2.51.2