File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ jobs:
202202 exit 1
203203 fi
204204
205- - name : Pre-populate the upstream/latest branch if first promotion
205+ - name : Merge upstream tag into upstream/latest
206206 working-directory : ./package-repo
207207 run : |
208208
@@ -214,7 +214,24 @@ 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 --ff-only ${{inputs.upstream-tag}}
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/workflows
234+ git commit -s -m "Remove .github/workflows from upstream source"
218235 fi
219236
220237 - name : Merge upstream tag into packaging branch
You can’t perform that action at this time.
0 commit comments