From 92fb8e5c04493de155f5c98af33434138fc0ec97 Mon Sep 17 00:00:00 2001 From: David Arnold Date: Wed, 27 Nov 2024 00:28:15 +0100 Subject: [PATCH] ci: fix migration base workflow when used downstream git ref (#28589) * ci: fix migration base workflow when used downstream git ref * ci: temporarily redirect --- .github/workflows/_base-migration.yml | 7 ++----- .github/workflows/server-tests.yml | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/_base-migration.yml b/.github/workflows/_base-migration.yml index ae16598439..e8091651f2 100644 --- a/.github/workflows/_base-migration.yml +++ b/.github/workflows/_base-migration.yml @@ -53,9 +53,6 @@ jobs: ${{ inputs.pre }} - name: Download database artifact - env: - current-base-ref: ${{ github.base_ref || github.ref_name }} - current-head-ref: ${{ github.head_ref || github.ref_name }} run: | eval "$(tombl -e MIGRATION_DB=tool.frappe-ci.setup.migration-db ${GITHUB_WORKSPACE}/apps/${{ github.event.repository.name }}/pyproject.toml)" || exit 0 source ${GITHUB_WORKSPACE}/env/bin/activate @@ -66,8 +63,8 @@ jobs: eval "$(tombl -e FRAPPE_DEPENDENCIES=tool.bench.frappe-dependencies ${GITHUB_WORKSPACE}/apps/${{ github.event.repository.name }}/pyproject.toml)" || true version="$1" if [ -z "$version" ]; then - base_ref="${{ env.current-base-ref }}" - head_ref="${{ env.current-head-ref }}" + base_ref="${{ github.base_ref || github.ref_name }}" + head_ref="${{ github.sha }}" else base_ref="version-$version-hotfix" head_ref="version-$version-hotfix" diff --git a/.github/workflows/server-tests.yml b/.github/workflows/server-tests.yml index a36d7b1985..3ceee83eff 100644 --- a/.github/workflows/server-tests.yml +++ b/.github/workflows/server-tests.yml @@ -54,7 +54,7 @@ jobs: migrate: name: Migration needs: checkrun - uses: frappe/frappe/.github/workflows/_base-migration.yml@develop + uses: blaggacao/frappe/.github/workflows/_base-migration.yml@develop with: python-version: '3.10' node-version: 20