You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- name: Show branches/tags and checkout debian/upstream latest
98
98
working-directory: ./package-repo
@@ -166,9 +166,9 @@ jobs:
166
166
- name: Add Upstream Link As A Remote And Fetch Tags
167
167
working-directory: ./package-repo
168
168
run: |
169
-
if [ -n "${{secrets.UPSTREAM_REPO_READ_PAT}}" ]; then
169
+
if [ -n "${{secrets.PAT}}" ]; then
170
170
echo "ℹ️ Adding upstream remote with token authentication. This is because the upstream repository may be private and require authentication to fetch tags."
# Override the global extraheader set by actions/checkout (GITHUB_TOKEN) which would otherwise
182
182
# take precedence over the credentials embedded in the URL and prevent access to external repos.
183
-
# if ! git -c http.https://github.com/.extraheader="" fetch upstream-source "+refs/tags/*:refs/tags/*"; then
184
-
if ! git fetch upstream-source "+refs/tags/*:refs/tags/*"; then
183
+
if ! git -c http.https://github.com/.extraheader="" fetch upstream-source "+refs/tags/*:refs/tags/*"; then
185
184
echo "❌ Failed to fetch tags from '${{inputs.upstream-repo}}'."
186
185
187
-
if [ -n "${{secrets.UPSTREAM_REPO_READ_PAT}}" ]; then
188
-
echo "❌ Ensure that the UPSTREAM_REPO_READ_PAT token has the permission on the repository."
186
+
if [ -n "${{secrets.PAT}}" ]; then
187
+
echo "❌ Ensure that the PAT token has the permission on the repository."
189
188
echo "❌ For more information about this token, see the README.md in qcom-build-utils repo."
190
189
else
191
-
echo "❌ Make sure the upstream repository is public or if it is private that the UPSTREAM_REPO_READ_PAT token is set and has the necessary permissions."
190
+
echo "❌ Make sure the upstream repository is public or if it is private that the PAT token is set and has the necessary permissions."
192
191
fi
193
192
194
193
exit 1
@@ -202,7 +201,7 @@ jobs:
202
201
exit 1
203
202
fi
204
203
205
-
- name: Pre-populate the upstream/latest branch if first promotion
204
+
- name: Merge upstream tag into upstream/latest
206
205
working-directory: ./package-repo
207
206
run: |
208
207
@@ -214,7 +213,24 @@ jobs:
214
213
else
215
214
# The branch exists, check it out and promote it to the upstream tag
216
215
git checkout upstream/latest
217
-
git merge --ff-only ${{inputs.upstream-tag}}
216
+
git merge ${{inputs.upstream-tag}}
217
+
fi
218
+
219
+
- name: Strip .github/workflows from upstream/latest
220
+
working-directory: ./package-repo
221
+
run: |
222
+
# Since Github does not allow pushing workflows using the GITHUB_TOKEN, remove .github/workflows if present.
0 commit comments