Skip to content

Commit 84d9d4c

Browse files
committed
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.
1 parent cc96764 commit 84d9d4c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/github-docker-registry-push.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ jobs:
5757
else
5858
git commit -m "Update Docker versions"
5959
git push origin docker-versions-update
60-
echo 'y' | gh pr create --fill
60+
# Create PR targeting the same branch where this workflow is running
61+
BASE_BRANCH="${GITHUB_REF#refs/heads/}"
62+
echo 'y' | gh pr create --fill --base "$BASE_BRANCH"
6163
fi
6264
6365
- name: Check for Dockerfile and context changes

0 commit comments

Comments
 (0)