diff --git a/.github/workflows/test-igor-rebase-exec-workflow.yml b/.github/workflows/test-igor-rebase-exec-workflow.yml index 8bde2ae0ee..a333db1cee 100644 --- a/.github/workflows/test-igor-rebase-exec-workflow.yml +++ b/.github/workflows/test-igor-rebase-exec-workflow.yml @@ -78,15 +78,23 @@ jobs: ref: ${{ github.sha }} - name: Initial repo config run: tools/initial-repo-config.sh + - name: Get latest release branch + run: | + release_branch=$(git branch --sort="version:refname" -rl "origin/release*" | tail -n1) + echo "release_branch=$release_branch" >> $GITHUB_ENV + - name: Gather base branch + run: | + base_branch=$((git merge-base --is-ancestor {{ env.release_branch }} HEAD && echo "{{ env.release_branch }}") || echo "origin/main") + echo "base_branch=$base_branch" >> $GITHUB_ENV - name: List of commits to operate on - run: git log --pretty=ref origin/main.. + run: git log --pretty=ref {{ env.base_branch }}.. - name: Cleanup earlier rebase invocations run: git rebase --quit 2>/dev/null || true - name: Compile check each commit with ${{ inputs.experiment }} run: | git rebase --exec "git log --pretty=ref -n1" \ --exec "tools/clean_mies_installation.sh ${{ inputs.installer_flags }}" \ - --exec "tools/autorun-test.sh -p ${{ inputs.experiment }} -v IP_9_64" origin/main + --exec "tools/autorun-test.sh -p ${{ inputs.experiment }} -v IP_9_64" {{ env.base_branch }} - name: Gather log files and crash dumps if: always() run: tools/gather-logfiles-and-crashdumps.sh