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
99
working-directory: ./package-repo
@@ -166,9 +167,9 @@ jobs:
166
167
- name: Add Upstream Link As A Remote And Fetch Tags
167
168
working-directory: ./package-repo
168
169
run: |
169
-
if [ -n "${{secrets.UPSTREAM_REPO_READ_PAT}}" ]; then
170
+
if [ -n "${{secrets.PAT}}" ]; then
170
171
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
183
# 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
184
if ! git fetch upstream-source "+refs/tags/*:refs/tags/*"; then
185
185
echo "❌ Failed to fetch tags from '${{inputs.upstream-repo}}'."
186
186
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."
187
+
if [ -n "${{secrets.PAT}}" ]; then
188
+
echo "❌ Ensure that the PAT token has the permission on the repository."
189
189
echo "❌ For more information about this token, see the README.md in qcom-build-utils repo."
190
190
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."
191
+
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
192
fi
193
193
194
194
exit 1
@@ -202,7 +202,7 @@ jobs:
202
202
exit 1
203
203
fi
204
204
205
-
- name: Pre-populate the upstream/latest branch if first promotion
205
+
- name: Merge upstream tag into upstream/latest
206
206
working-directory: ./package-repo
207
207
run: |
208
208
@@ -214,7 +214,24 @@ jobs:
214
214
else
215
215
# The branch exists, check it out and promote it to the upstream tag
216
216
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.
0 commit comments