From e5aeb5fecb693e8c33ab3880e53c73e545cd7ec5 Mon Sep 17 00:00:00 2001 From: paul-1 <6473457+paul-1@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:25:56 +0000 Subject: [PATCH 1/2] Keep pCP workflows unchanged when merging upstream The workflow token cannot push changes to .github/workflows, which made the upstream merge push fail. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/scripts/check-upstream-releases.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/scripts/check-upstream-releases.sh b/.github/scripts/check-upstream-releases.sh index 23cff08..3269277 100644 --- a/.github/scripts/check-upstream-releases.sh +++ b/.github/scripts/check-upstream-releases.sh @@ -54,7 +54,12 @@ while IFS= read -r version; do exit 1 fi - git merge --no-ff --strategy=ort --allow-unrelated-histories --no-edit "$upstream" + # The workflow token cannot push workflow file changes, so keep our own copy of .github/workflows. + pre_merge=$(git rev-parse HEAD) + git merge --no-ff --no-commit --strategy=ort --allow-unrelated-histories "$upstream" + git rm -rqf --ignore-unmatch -- .github/workflows + git checkout "$pre_merge" -- .github/workflows + git commit --no-edit sed -i "s/^VERSION=.*/VERSION=\"${version}-pCP\"/" pcp-rpi-eeprom-update if ! grep -Fxq "VERSION=\"${version}-pCP\"" pcp-rpi-eeprom-update; then echo "Could not update the package version." >&2 From 82b857f2d1346b402463fb48d9ca4ea58ad2bed8 Mon Sep 17 00:00:00 2001 From: paul-1 <6473457+paul-1@users.noreply.github.com> Date: Wed, 18 Nov 2026 15:34:29 +0000 Subject: [PATCH 2/2] Handle release pipeline fixture edge cases Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- .github/scripts/check-upstream-releases.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/scripts/check-upstream-releases.sh b/.github/scripts/check-upstream-releases.sh index 3269277..48909b7 100644 --- a/.github/scripts/check-upstream-releases.sh +++ b/.github/scripts/check-upstream-releases.sh @@ -56,10 +56,14 @@ while IFS= read -r version; do # The workflow token cannot push workflow file changes, so keep our own copy of .github/workflows. pre_merge=$(git rev-parse HEAD) - git merge --no-ff --no-commit --strategy=ort --allow-unrelated-histories "$upstream" - git rm -rqf --ignore-unmatch -- .github/workflows - git checkout "$pre_merge" -- .github/workflows - git commit --no-edit + if [[ "$upstream" != "$previous" ]]; then + git merge --no-ff --no-commit --strategy=ort --allow-unrelated-histories "$upstream" + git rm -rqf --ignore-unmatch -- .github/workflows + if git ls-tree -r --name-only "$pre_merge" -- .github/workflows | grep -q .; then + git checkout "$pre_merge" -- .github/workflows + fi + git commit --no-edit + fi sed -i "s/^VERSION=.*/VERSION=\"${version}-pCP\"/" pcp-rpi-eeprom-update if ! grep -Fxq "VERSION=\"${version}-pCP\"" pcp-rpi-eeprom-update; then echo "Could not update the package version." >&2