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
97
+
working-directory: ./package-repo
91
98
run: |
92
-
cd ./package-repo
93
-
94
99
git branch
95
100
git tag
96
101
git checkout ${{inputs.debian-branch}}
@@ -102,18 +107,16 @@ jobs:
102
107
fi
103
108
104
109
- name: Make sure the upstream tag is not already part of the repo
110
+
working-directory: ./package-repo
105
111
run: |
106
-
cd ./package-repo
107
-
108
112
if (git tag --list | grep "${{inputs.upstream-tag}}"); then
109
113
echo "❌ The supplied upstream tag is wrong as it pertains to this repo already."
110
114
exit 1
111
115
fi
112
116
113
117
- name: Validate the upstream tag promotion state
118
+
working-directory: ./package-repo
114
119
run: |
115
-
cd ./package-repo
116
-
117
120
# Check if the upstream/<normalized_version> tag does not already exists
118
121
if ! git tag --list | grep "upstream/${{env.NORMALIZED_VERSION}}"; then
119
122
echo "✅ The upstream tag '${{inputs.upstream-tag}}' has not been promoted yet. Continuing."
@@ -136,7 +139,6 @@ jobs:
136
139
echo "ℹ️ This is likely a second attempt to promote the same upstream tag, where the first attempt already added the upstream tag in the upstram branch"
if [ -n "${{secrets.UPSTREAM_REPO_READ_PAT}}" ]; then
169
+
echo "ℹ️ Adding upstream remote with token authentication. This is because the upstream repository may be private and require authentication to fetch tags."
echo "ℹ️ Fetching tags from upstream repository using token authentication."
179
+
180
+
if ! git fetch upstream-source "+refs/tags/*:refs/tags/*"; then
181
+
echo "❌ Failed to fetch tags from '${{inputs.upstream-repo}}'."
182
+
183
+
if [ -n "${{secrets.UPSTREAM_REPO_READ_PAT}}" ]; then
184
+
echo "❌ Ensure that the UPSTREAM_REPO_READ_PAT token has the permission on the repository."
185
+
echo "❌ For more information about this token, see the README.md in qcom-build-utils repo."
186
+
else
187
+
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."
188
+
fi
189
+
`
190
+
exit 1
191
+
fi
168
192
169
193
- name: Ensure the tag exists in the upstream repo
194
+
working-directory: ./package-repo
170
195
run: |
171
-
cd ./package-repo
172
-
173
196
if ! git rev-parse --verify "refs/tags/${{inputs.upstream-tag}}" >/dev/null 2>&1; then
174
197
echo "❌ The specified upstream tag '${{inputs.upstream-tag}}' does not exist in the upstream repository."
175
198
exit 1
176
199
fi
177
200
178
201
- name: Pre-populate the upstream/latest branch if first promotion
202
+
working-directory: ./package-repo
179
203
run: |
180
-
cd ./package-repo
181
204
182
205
# If the upstream/latest branch does not exist yet, create it and give it
183
206
# the history of upstream directly, instead of creating an --allow-empty commit
0 commit comments