Skip to content

Commit 93f63aa

Browse files
committed
ci: test passing github pat
1 parent f87455a commit 93f63aa

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

.github/workflows/create-release-pr.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,16 @@ on:
5050
jobs:
5151
prep:
5252
uses: OneSignal/sdk-actions/.github/workflows/prep-release.yml@main
53+
secrets:
54+
# Need this cross-repo token (sdk-actions & this repo) to perform changes
55+
GH_PUSH_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
5356
with:
57+
# Need target_repo otherwise caller would set github.repository to the caller itself (e.g. sdk-actions)
5458
target_repo: OneSignal/OneSignal-Cordova-SDK
5559
version: ${{ inputs.cordova_version }}
5660

5761
# Cordova specific steps
58-
update-version:
62+
update_version:
5963
needs: prep
6064
runs-on: macos-latest
6165
outputs:
@@ -67,8 +71,10 @@ jobs:
6771
- name: Checkout
6872
uses: actions/checkout@v5
6973
with:
74+
# Need repository otherwise caller would set github.repository to the caller itself (e.g. sdk-actions)
7075
repository: OneSignal/OneSignal-Cordova-SDK
7176
ref: ${{ needs.prep.outputs.release_branch }}
77+
token: ${{ secrets.GH_PUSH_TOKEN || github.token }}
7278

7379
- name: Setup Bun
7480
uses: oven-sh/setup-bun@v2
@@ -96,9 +102,7 @@ jobs:
96102
97103
- name: Setup Capacitor
98104
run: |
99-
bun link
100105
cd example/IonicCapOneSignal
101-
bun install --frozen-lockfile
102106
bun run build
103107
104108
- name: Update Android SDK version
@@ -180,9 +184,13 @@ jobs:
180184
git push
181185
182186
create-pr:
183-
needs: [prep, update-version]
187+
needs: [prep, update_version]
184188
uses: OneSignal/sdk-actions/.github/workflows/create-release.yml@main
189+
secrets:
190+
# Need this cross-repo token (sdk-actions & this repo) to perform changes
191+
GH_PUSH_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
185192
with:
193+
# Need target_repo otherwise caller would set github.repository to the caller itself (e.g. sdk-actions)
186194
target_repo: OneSignal/OneSignal-Cordova-SDK
187195
release_branch: ${{ needs.prep.outputs.release_branch }}
188196
target_branch: ${{ inputs.target_branch }}

example/IonicCapOneSignal/scripts/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ mv onesignal-cordova-plugin-*.tgz onesignal-cordova-plugin.tgz
88

99
# Install/update the plugin in the example app
1010
cd example/IonicCapOneSignal
11-
bun i
11+
if [ -n "$CI" ]; then
12+
bun install --frozen-lockfile
13+
else
14+
bun i
15+
fi
1216

1317
# Build example
1418
tsc && vite build

0 commit comments

Comments
 (0)