@@ -201,10 +201,10 @@ jobs:
201201 echo "❌ The specified upstream tag '${{inputs.upstream-tag}}' does not exist in the upstream repository."
202202 exit 1
203203 fi
204-
205- - name : Merge upstream tag into upstream/latest
206- working-directory : ./package-repo
204+
205+ - name : Pre-populate the upstream/latest branch if first promotion
207206 run : |
207+ cd ./package-repo
208208
209209 # If the upstream/latest branch does not exist yet, create it and give it
210210 # the history of upstream directly, instead of creating an --allow-empty commit
@@ -214,24 +214,7 @@ jobs:
214214 else
215215 # The branch exists, check it out and promote it to the upstream tag
216216 git checkout upstream/latest
217- git merge ${{inputs.upstream-tag}}
218- fi
219-
220- - name : Strip .github/workflows from upstream/latest
221- working-directory : ./package-repo
222- run : |
223- # Since Github does not allow pushing workflows using the GITHUB_TOKEN, remove .github/workflows if present.
224-
225- git config user.name "${{vars.DEB_PKG_BOT_CI_NAME}}"
226- git config user.email "${{vars.DEB_PKG_BOT_CI_EMAIL}}"
227-
228- git checkout upstream/latest
229-
230- # Remove .github/workflows/ if present to avoid GITHUB_TOKEN push restrictions.
231- # The upstream source repo workflows are not relevant to the packaging repo.
232- if [ -d .github/workflows ]; then
233- git rm -rf .github/
234- git commit -s -m "Remove .github/workflows from upstream source"
217+ git merge --ff-only ${{inputs.upstream-tag}}
235218 fi
236219
237220 - name : Merge upstream tag into packaging branch
0 commit comments