Skip to content

Commit f1346d0

Browse files
token: switch over to GITHUB_TOKEN
Signed-off-by: Simon Beaudoin <sbeaudoi@qti.qualcomm.com>
1 parent 00ff040 commit f1346d0

4 files changed

Lines changed: 17 additions & 8 deletions

.github/workflows/qcom-promote-prebuilt-reusable-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ jobs:
231231
run: |
232232
cd ./package-repo
233233
234-
gh auth login --with-token <<< "${{secrets.DEB_PKG_BOT_CI_TOKEN}}"
234+
gh auth login --with-token <<< "${{secrets.GITHUB_TOKEN}}"
235235
236236
PR_TITLE="Promotion to ${{env.NEW_DEBIAN_VERSION}} (Artifactory tag: ${{inputs.new-tag}})"
237237

.github/workflows/qcom-promote-upstream-reusable-workflow.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ on:
3131
type: string
3232
required: true
3333

34+
secrets:
35+
TOKEN:
36+
required: false
37+
3438
permissions:
3539
contents: write
3640
packages: read
@@ -87,6 +91,11 @@ jobs:
8791
path: ./package-repo
8892
fetch-depth: 0
8993

94+
- name: Authenticate with GitHub
95+
run : |
96+
# TODO remove this redundant login
97+
gh auth login --with-token <<< "${{secrets.GITHUB_TOKEN}}"
98+
9099
- name: Show branches/tags and checkout debian/upstream latest
91100
run: |
92101
cd ./package-repo
@@ -136,7 +145,6 @@ jobs:
136145
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"
137146
138147
# Check if there is a PR open for this already
139-
gh auth login --with-token <<< "${{secrets.DEB_PKG_BOT_CI_TOKEN}}"
140148
PRS=$(gh pr list --head "debian/pr/${{env.NORMALIZED_VERSION}}-1" --state open --json number --jq '.[].number')
141149
if [ -n "$PRS" ]; then
142150
echo "❌ An open PR already exists for this promotion attempt: $PRS"
@@ -163,7 +171,11 @@ jobs:
163171
- name: Add Upstream Link As A Remote And Fetch Tags
164172
run: |
165173
cd ./package-repo
166-
git remote add upstream-source https://x-access-token:${{secrets.DEB_PKG_BOT_CI_TOKEN}}@github.com/${{inputs.upstream-repo}}.git
174+
if [ -n "${{secrets.TOKEN}}" ]; then
175+
git remote add upstream-source https://x-access-token:${{secrets.TOKEN}}@github.com/${{inputs.upstream-repo}}.git
176+
else
177+
git remote add upstream-source https://github.com/${{inputs.upstream-repo}}.git
178+
fi
167179
git fetch upstream-source "+refs/tags/*:refs/tags/*"
168180
169181
- name: Ensure the tag exists in the upstream repo
@@ -240,9 +252,6 @@ jobs:
240252
run: |
241253
cd ./package-repo
242254
243-
# TODO remove this redundant login
244-
gh auth login --with-token <<< "${{secrets.DEB_PKG_BOT_CI_TOKEN}}"
245-
246255
../qcom-build-utils/scripts/create_promotion_pr.py \
247256
--base-branch "${{inputs.debian-branch}}" \
248257
--upstream-tag "${{inputs.upstream-tag}}" \

.github/workflows/qcom-release-reusable-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ jobs:
323323
- name: Notify qcom-distro-images of new release via repository dispatch
324324
uses: peter-evans/repository-dispatch@v3
325325
with:
326-
token: ${{secrets.DEB_PKG_BOT_CI_TOKEN}}
326+
token: ${{secrets.GITHUB_TOKEN}}
327327
repository: qualcomm-linux/qcom-distro-images
328328
event-type: pkg-repo-release
329329
client-payload: >-

.github/workflows/qcom-upstream-pr-pkg-build-reusable-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
options: --privileged
6666
credentials:
6767
username: ${{ github.actor }}
68-
password: ${{ secrets.GITHUB_TOKEN }}
68+
password: ${{ ITHUB_TOKEN }}
6969

7070
steps:
7171

0 commit comments

Comments
 (0)