Skip to content

Commit e2705ac

Browse files
authored
ci: [SDK-4483] use GH_PUSH_TOKEN for release and project workflows (#1457)
1 parent 8924d4d commit e2705ac

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
if: steps.get_version.outputs.version != ''
7979
run: ./build/scripts/turbine.sh
8080
env:
81-
GH_TURBINE_TOKEN: ${{ secrets.GH_TURBINE_TOKEN }}
81+
GH_PUSH_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
8282
GITHUB_SHA: ${{ github.sha }}
8383
GITHUB_RUN_ID: ${{ github.run_id }}
8484
SDK_VERSION: ${{ steps.get_version.outputs.version }}

.github/workflows/project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
with:
1515
# SDK Web Project
1616
project-url: https://github.com/orgs/OneSignal/projects/9
17-
github-token: ${{ secrets.GH_PROJECTS_TOKEN }}
17+
github-token: ${{ secrets.GH_PUSH_TOKEN }}

build/scripts/turbine.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
set -euo pipefail
33

4-
git clone "https://${GH_TURBINE_TOKEN}@github.com/OneSignal/turbine.git" turbine
4+
git clone "https://${GH_PUSH_TOKEN}@github.com/OneSignal/turbine.git" turbine
55
cd turbine
66

77
# Configure git identity
@@ -13,12 +13,12 @@ BRANCH_NAME="web-sdk-${SDK_VERSION}-release"
1313

1414
# Close any existing PRs for this branch
1515
curl -s \
16-
-H "Authorization: Bearer $GH_TURBINE_TOKEN" \
16+
-H "Authorization: Bearer $GH_PUSH_TOKEN" \
1717
"https://api.github.com/repos/OneSignal/turbine/pulls?head=OneSignal:$BRANCH_NAME&state=open" |
1818
jq -r '.[].number' | while read PR_NUM; do
1919
echo "Closing existing PR #$PR_NUM"
2020
curl -sS -X PATCH \
21-
-H "Authorization: Bearer $GH_TURBINE_TOKEN" \
21+
-H "Authorization: Bearer $GH_PUSH_TOKEN" \
2222
-H "Content-Type: application/json" \
2323
-d '{"state": "closed"}' \
2424
"https://api.github.com/repos/OneSignal/turbine/pulls/$PR_NUM"
@@ -48,7 +48,7 @@ git push --force origin "$BRANCH_NAME"
4848
# Create pull request
4949
PR_NUMBER=$(
5050
curl -sS -X POST \
51-
-H "Authorization: Bearer $GH_TURBINE_TOKEN" \
51+
-H "Authorization: Bearer $GH_PUSH_TOKEN" \
5252
-H "Content-Type: application/json" \
5353
-d "{
5454
\"title\": \"$RELEASE_MESSAGE\",
@@ -62,7 +62,7 @@ PR_NUMBER=$(
6262

6363
# Request team reviewers
6464
curl -sS -X POST \
65-
-H "Authorization: Bearer $GH_TURBINE_TOKEN" \
65+
-H "Authorization: Bearer $GH_PUSH_TOKEN" \
6666
-H "Content-Type: application/json" \
6767
-d "{
6868
\"team_reviewers\": [\"eng-sdk-platform\"]

0 commit comments

Comments
 (0)