From d3148b3772cbabcaf872e3750994d943a9fc6d26 Mon Sep 17 00:00:00 2001 From: acx10 Date: Sun, 28 Dec 2025 22:50:27 -0700 Subject: [PATCH] Fix master pipeline --- .github/workflows/master-pipeline.yml | 19 +++++++++++++++++-- .github/workflows/migrations-check.yml | 3 ++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/master-pipeline.yml b/.github/workflows/master-pipeline.yml index 11d45904c..808d236af 100644 --- a/.github/workflows/master-pipeline.yml +++ b/.github/workflows/master-pipeline.yml @@ -6,12 +6,27 @@ on: - 'master' jobs: + get-base-ref: + name: Get Base Ref + runs-on: ubuntu-latest + outputs: + base_ref: ${{ steps.get_base.outputs.base_ref }} + steps: + - name: Checkout Repository + uses: actions/checkout@v6 + with: + fetch-depth: 2 + - name: Get Base Ref + id: get_base + run: echo "base_ref=$(git rev-parse HEAD~1)" >> $GITHUB_OUTPUT + migration-check: name: Flyway Migration Check on Master + needs: [ get-base-ref ] uses: ./.github/workflows/migrations-check.yml with: - base_ref: 'HEAD~1' - head_ref: 'HEAD' + base_ref: ${{ needs.get-base-ref.outputs.base_ref }} + head_ref: ${{ github.sha }} build-and-release: needs: [ migration-check ] diff --git a/.github/workflows/migrations-check.yml b/.github/workflows/migrations-check.yml index b0d072b06..ffa87ab64 100644 --- a/.github/workflows/migrations-check.yml +++ b/.github/workflows/migrations-check.yml @@ -64,6 +64,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.base_ref }} + fetch-depth: 0 - name: Apply Migrations from Base Branch run: | @@ -80,6 +81,7 @@ jobs: uses: actions/checkout@v6 with: ref: ${{ inputs.head_ref }} + fetch-depth: 0 - name: Apply Migrations from Head Branch run: | @@ -94,4 +96,3 @@ jobs: - name: Confirm Flyway Dry Run Success run: echo "✅ Flyway migration preview successful. Migrations can be applied cleanly." -