Skip to content

Commit 068fc1b

Browse files
committed
update release with secret and target repo
1 parent a617df9 commit 068fc1b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Create Release PR
33
on:
44
# For making a release pr from android / ios sdk actions
55
workflow_call:
6+
secrets:
7+
GH_PUSH_TOKEN:
8+
required: false
9+
description: "GitHub token for pushing changes"
610
inputs:
711
flutter_version:
812
description: "New Flutter SDK Version (e.g., 5.3.4 or 5.3.4-beta.1)"
@@ -46,7 +50,12 @@ on:
4650
jobs:
4751
prep:
4852
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 }}
4956
with:
57+
# Need target_repo otherwise caller would set github.repository to the caller itself (e.g. sdk-actions)
58+
target_repo: OneSignal/OneSignal-Flutter-SDK
5059
version: ${{ inputs.flutter_version }}
5160

5261
update-version:
@@ -61,7 +70,10 @@ jobs:
6170
- name: Checkout
6271
uses: actions/checkout@v5
6372
with:
73+
# Need repository otherwise caller would set github.repository to the caller itself (e.g. sdk-actions)
74+
repository: OneSignal/OneSignal-Flutter-SDK
6475
ref: ${{ needs.prep.outputs.release_branch }}
76+
token: ${{ secrets.GH_PUSH_TOKEN || github.token }}
6577

6678
- name: Get current native SDK versions
6779
id: current_versions
@@ -154,7 +166,12 @@ jobs:
154166
create-pr:
155167
needs: [prep, update-version]
156168
uses: OneSignal/sdk-actions/.github/workflows/create-release.yml@main
169+
secrets:
170+
# Need this cross-repo token (sdk-actions & this repo) to perform changes
171+
GH_PUSH_TOKEN: ${{ secrets.GH_PUSH_TOKEN }}
157172
with:
173+
# Need target_repo otherwise caller would set github.repository to the caller itself (e.g. sdk-actions)
174+
target_repo: OneSignal/OneSignal-Cordova-SDK
158175
release_branch: ${{ needs.prep.outputs.release_branch }}
159176
target_branch: ${{ inputs.target_branch }}
160177
android_from: ${{ needs.update-version.outputs.android_from }}

0 commit comments

Comments
 (0)