From 84d9d4cc7aa7e71753730036d50d6e2f3eab2f86 Mon Sep 17 00:00:00 2001 From: Bruno Verachten Date: Fri, 14 Nov 2025 11:50:00 +0100 Subject: [PATCH] fix: target correct base branch for docker-versions PR The workflow was creating PRs against the default branch (main) instead of the branch where it was running. When running on weekly, this caused PRs trying to merge the entire weekly history into main. Now extracts the current branch from GITHUB_REF and uses it as the base branch for the PR, ensuring docker-versions updates stay on the same branch. --- .github/workflows/github-docker-registry-push.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-docker-registry-push.yml b/.github/workflows/github-docker-registry-push.yml index 15430e5c..a42202c1 100644 --- a/.github/workflows/github-docker-registry-push.yml +++ b/.github/workflows/github-docker-registry-push.yml @@ -57,7 +57,9 @@ jobs: else git commit -m "Update Docker versions" git push origin docker-versions-update - echo 'y' | gh pr create --fill + # Create PR targeting the same branch where this workflow is running + BASE_BRANCH="${GITHUB_REF#refs/heads/}" + echo 'y' | gh pr create --fill --base "$BASE_BRANCH" fi - name: Check for Dockerfile and context changes