-
Notifications
You must be signed in to change notification settings - Fork 13
582 lines (560 loc) · 21 KB
/
build_app.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
name: Build App
run-name: ${{ format('Build {0}{1}', github.event.inputs.branch, github.event.inputs.notes && format(' - {0}', github.event.inputs.notes)) }}
on:
workflow_dispatch:
inputs:
branch:
description: 'The branch, tag or PR number ("pr/<number>") to build'
type: string
default: 'main'
required: true
notes:
description: 'Notes'
type: string
required: false
build-release:
description: 'Build a release version'
type: boolean
required: false
workflow_call:
inputs:
build-release:
type: boolean
required: false
# Will possibly create a deadlock.
# "Canceling since a deadlock for concurrency group '...' was detected between 'top level workflow' and 'build'".
# concurrency:
# group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
# cancel-in-progress: true
jobs:
generate-changelog:
name: "Generate Changelog"
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.15.0
- name: Checkout code
uses: actions/checkout@v4
if: ${{ !startsWith(github.event.inputs.branch, 'pr/') }}
with:
ref: ${{ github.event.inputs.branch || github.ref }}
fetch-depth: 0
- name: Checkout code (for manual PR builds)
uses: actions/checkout@v4
if: ${{ startsWith(github.event.inputs.branch, 'pr/') }}
- name: Merge code (for manual PR builds)
if: ${{ startsWith(github.event.inputs.branch, 'pr/') }}
env:
INPUT: ${{ github.event.inputs.branch }}
GITHUB_TOKEN: ${{ github.token }}
GITHUB_API_URL: ${{ github.api_url }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
PR_NUMBER="$(echo $INPUT | sed -n 's/^pr\///p')"
PR_DETAILS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER")
if [[ $(echo "$PR_DETAILS" | jq -r '.message // empty') == "Not Found" ]]; then
echo "::error ::Pull request #$PR_NUMBER not found."
exit 1
fi
BASE_REPO_CLONE_URL=$(echo "$PR_DETAILS" | jq -r '.base.repo.clone_url')
BASE_REF=$(echo "$PR_DETAILS" | jq -r '.base.ref')
HEAD_REPO_CLONE_URL=$(echo "$PR_DETAILS" | jq -r '.head.repo.clone_url')
HEAD_REF=$(echo "$PR_DETAILS" | jq -r '.head.ref')
git remote add base_repo $BASE_REPO_CLONE_URL
git fetch --depth=10000 base_repo $BASE_REF
git remote add head_repo $HEAD_REPO_CLONE_URL
git fetch --depth=10000 head_repo $HEAD_REF
git checkout "base_repo/$BASE_REF"
git config --global user.email "[email protected]"
git config --global user.name "CI"
git merge "head_repo/$HEAD_REF" --no-edit
echo "Last commits:"
git log --oneline -n 16
- name: Generate Changelog
env:
# See: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: |
node .github/workflows/scripts/generate-changelog-from-github-context.js "$GITHUB_CONTEXT" > changelog.txt
- name: Show changelog.txt
run: |
cat changelog.txt
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: changelog
path: changelog.txt
build-android:
name: "Build Android"
runs-on: ubuntu-latest
needs:
- generate-changelog
steps:
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.15.0
- name: Checkout code
uses: actions/checkout@v4
if: ${{ !startsWith(github.event.inputs.branch, 'pr/') }}
with:
ref: ${{ github.event.inputs.branch || github.ref }}
- name: Checkout code (for manual PR builds)
uses: actions/checkout@v4
if: ${{ startsWith(github.event.inputs.branch, 'pr/') }}
- name: Merge code (for manual PR builds)
if: ${{ startsWith(github.event.inputs.branch, 'pr/') }}
env:
INPUT: ${{ github.event.inputs.branch }}
GITHUB_TOKEN: ${{ github.token }}
GITHUB_API_URL: ${{ github.api_url }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
PR_NUMBER="$(echo $INPUT | sed -n 's/^pr\///p')"
PR_DETAILS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER")
if [[ $(echo "$PR_DETAILS" | jq -r '.message // empty') == "Not Found" ]]; then
echo "::error ::Pull request #$PR_NUMBER not found."
exit 1
fi
BASE_REPO_CLONE_URL=$(echo "$PR_DETAILS" | jq -r '.base.repo.clone_url')
BASE_REF=$(echo "$PR_DETAILS" | jq -r '.base.ref')
HEAD_REPO_CLONE_URL=$(echo "$PR_DETAILS" | jq -r '.head.repo.clone_url')
HEAD_REF=$(echo "$PR_DETAILS" | jq -r '.head.ref')
git remote add base_repo $BASE_REPO_CLONE_URL
git fetch --depth=10000 base_repo $BASE_REF
git remote add head_repo $HEAD_REPO_CLONE_URL
git fetch --depth=10000 head_repo $HEAD_REF
git checkout "base_repo/$BASE_REF"
git config --global user.email "[email protected]"
git config --global user.name "CI"
git merge "head_repo/$HEAD_REF" --no-edit
echo "Last commits:"
git log --oneline -n 16
- name: Create branch
env:
REF_NAME: ${{ github.event.inputs.branch || github.ref_name }}
run: |
[ -n "$REF_NAME" ] && git checkout -b "ci/$REF_NAME"
git status
- name: Cache node_modules
uses: actions/cache@v3
env:
cache-name: app-node_modules
with:
path: App/node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('App/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Yarn install
run: |
cd App
yarn install
- name: Get Changelog
uses: actions/download-artifact@v3
with:
name: changelog
path: App
- name: Prepare Keystore
run: |
mkdir -p ~/.gradle
echo "${{ secrets.GRADLE_PROPERTIES }}" > ~/.gradle/gradle.properties
mkdir -p App/android/app
echo "${{ secrets.DEV_KEYSTORE_BASE64 }}" > App/android/app/dev.keystore.base64
base64 --decode App/android/app/dev.keystore.base64 > App/android/app/dev.keystore
- name: Build Android
run: |
cd App
cd android
./gradlew assembleRelease
- name: Upload Built APK
uses: actions/upload-artifact@v3
with:
name: android-app-apk
path: App/android/app/build/outputs/apk/release/app-release.apk
- name: Write Android build info
run: |
cd App/android
echo '{}' > android_build_info.json
- name: Upload Android build info
uses: actions/upload-artifact@v3
with:
name: android-build-info
path: |
App/android/android_build_info.json
build-ios-nightly:
name: "Build iOS Nightly"
runs-on: macos-latest
timeout-minutes: 60
needs:
- generate-changelog
concurrency:
# For iOS build number auto increment (by Fastlane, since Xcode build number auto manage seems not to be working) to work, we must only have one build at a time.
group: build-ios-nightly
cancel-in-progress: false
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.15.0
- name: Checkout code
uses: actions/checkout@v4
if: ${{ !startsWith(github.event.inputs.branch, 'pr/') }}
with:
ref: ${{ github.event.inputs.branch || github.ref }}
- name: Checkout code (for manual PR builds)
uses: actions/checkout@v4
if: ${{ startsWith(github.event.inputs.branch, 'pr/') }}
- name: Merge code (for manual PR builds)
if: ${{ startsWith(github.event.inputs.branch, 'pr/') }}
env:
INPUT: ${{ github.event.inputs.branch }}
GITHUB_TOKEN: ${{ github.token }}
GITHUB_API_URL: ${{ github.api_url }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
PR_NUMBER="$(echo $INPUT | sed -n 's/^pr\///p')"
PR_DETAILS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER")
if [[ $(echo "$PR_DETAILS" | jq -r '.message // empty') == "Not Found" ]]; then
echo "::error ::Pull request #$PR_NUMBER not found."
exit 1
fi
BASE_REPO_CLONE_URL=$(echo "$PR_DETAILS" | jq -r '.base.repo.clone_url')
BASE_REF=$(echo "$PR_DETAILS" | jq -r '.base.ref')
HEAD_REPO_CLONE_URL=$(echo "$PR_DETAILS" | jq -r '.head.repo.clone_url')
HEAD_REF=$(echo "$PR_DETAILS" | jq -r '.head.ref')
git remote add base_repo $BASE_REPO_CLONE_URL
git fetch --depth=10000 base_repo $BASE_REF
git remote add head_repo $HEAD_REPO_CLONE_URL
git fetch --depth=10000 head_repo $HEAD_REF
git checkout "base_repo/$BASE_REF"
git config --global user.email "[email protected]"
git config --global user.name "CI"
git merge "head_repo/$HEAD_REF" --no-edit
echo "Last commits:"
git log --oneline -n 16
- name: Create branch
env:
REF_NAME: ${{ github.event.inputs.branch || github.ref_name }}
run: |
[ -n "$REF_NAME" ] && git checkout -b "ci/$REF_NAME"
git status
- name: Cache node_modules
uses: actions/cache@v3
env:
cache-name: app-node_modules
with:
path: App/node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('App/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Yarn install
run: |
cd App
yarn install
- name: Get Changelog
uses: actions/download-artifact@v3
with:
name: changelog
path: App
- name: Prepare config.xcconfig
run: |
echo "${{ secrets.CONFIG_XCCONFIG }}" > App/ios/config.xcconfig
echo "MARKETING_VERSION = 0.1.2" >> App/ios/config.xcconfig
echo "CURRENT_PROJECT_VERSION = 10" >> App/ios/config.xcconfig
echo "${{ secrets.AUTHKEY_P8_BASE64 }}" > ~/AuthKey.p8.base64
base64 --decode ~/AuthKey.p8.base64 > ~/AuthKey.p8
- name: Cache Pods
uses: actions/cache@v3
env:
cache-name: app-pods
with:
path: App/ios/Pods
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('App/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Pod install
env:
USE_BUILDCACHE: true
run: |
cd App
bash scripts/pod-install.sh
- name: Install Fastlane
run: |
cd App/ios
bundle install
# Patch cert_checker.rb to not print out sensitive information.
# See: https://github.com/fastlane/fastlane/issues/21351
FASTLANE_PATH="$(bundle show fastlane)"
FASTLANE_PATH_CERT_CHECKER_PATH="$FASTLANE_PATH/fastlane_core/lib/fastlane_core/cert_checker.rb"
if [[ -f "$FASTLANE_PATH_CERT_CHECKER_PATH" ]]; then
patch --force "$FASTLANE_PATH_CERT_CHECKER_PATH" < fastlane/cert_checker.patch
else
exit 1
fi
- name: Set Sync Code Signing Git SSH key
env:
SYNC_CODE_SIGNING_GIT_SSH_KEY: ${{ secrets.SYNC_CODE_SIGNING_GIT_SSH_KEY }}
run: |
ssh-agent sh -c 'echo "$SYNC_CODE_SIGNING_GIT_SSH_KEY"' | ssh-add -
- uses: mikehardy/buildcache-action@v2
with:
cache_key: nightly
- name: Fastlane Nightly
env:
CI: true
SYNC_CODE_SIGNING_GIT_URL: ${{ secrets.SYNC_CODE_SIGNING_GIT_URL }}
# The passphrase to decrypt the profiles stored in Git repo.
# See: https://docs.fastlane.tools/actions/sync_code_signing/#passphrase
MATCH_PASSWORD: ${{ secrets.SYNC_CODE_SIGNING_GIT_PASSPHRASE }}
SKIP_UPLOAD_TO_TESTFLIGHT: true
run: |
cd App/ios
bundle exec fastlane nightly
- name: Show error log
if: ${{ failure() }}
run: |
cat '/Users/runner/Library/Logs/gym/Inventory-Inventory (Nightly).log' || :
- name: Upload Nightly app to TestFlight
continue-on-error: true
timeout-minutes: 10
env:
CI: true
run: |
cd App/ios
bundle exec fastlane lane_upload_to_testflight
cp ci_output_data.json ios_appstore_upload_info_nightly.json
- name: Upload App Store Upload Info
uses: actions/upload-artifact@v3
with:
name: ios-appstore-upload-info-nightly
path: |
App/ios/ios_appstore_upload_info_nightly.json
- name: Upload Archive
uses: actions/upload-artifact@v3
with:
name: ios-archive-nightly
path: |
App/ios/*.xcarchive
App/ios/*.xcarchive.zip
App/*.xcarchive
App/*.xcarchive.zip
build-ios-release:
name: "Build iOS Release"
if: ${{ github.events.inputs.build-release || inputs.build-release }}
runs-on: macos-latest
timeout-minutes: 60
needs:
- generate-changelog
concurrency:
# For iOS build number auto increment (by Fastlane, since Xcode build number auto manage seems not to be working) to work, we must only have one build at a time.
group: build-ios-release
cancel-in-progress: false
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.15.0
- name: Checkout code
uses: actions/checkout@v4
if: ${{ !startsWith(github.event.inputs.branch, 'pr/') }}
with:
ref: ${{ github.event.inputs.branch || github.ref }}
- name: Checkout code (for manual PR builds)
uses: actions/checkout@v4
if: ${{ startsWith(github.event.inputs.branch, 'pr/') }}
- name: Merge code (for manual PR builds)
if: ${{ startsWith(github.event.inputs.branch, 'pr/') }}
env:
INPUT: ${{ github.event.inputs.branch }}
GITHUB_TOKEN: ${{ github.token }}
GITHUB_API_URL: ${{ github.api_url }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
PR_NUMBER="$(echo $INPUT | sed -n 's/^pr\///p')"
PR_DETAILS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER")
if [[ $(echo "$PR_DETAILS" | jq -r '.message // empty') == "Not Found" ]]; then
echo "::error ::Pull request #$PR_NUMBER not found."
exit 1
fi
BASE_REPO_CLONE_URL=$(echo "$PR_DETAILS" | jq -r '.base.repo.clone_url')
BASE_REF=$(echo "$PR_DETAILS" | jq -r '.base.ref')
HEAD_REPO_CLONE_URL=$(echo "$PR_DETAILS" | jq -r '.head.repo.clone_url')
HEAD_REF=$(echo "$PR_DETAILS" | jq -r '.head.ref')
git remote add base_repo $BASE_REPO_CLONE_URL
git fetch --depth=10000 base_repo $BASE_REF
git remote add head_repo $HEAD_REPO_CLONE_URL
git fetch --depth=10000 head_repo $HEAD_REF
git checkout "base_repo/$BASE_REF"
git config --global user.email "[email protected]"
git config --global user.name "CI"
git merge "head_repo/$HEAD_REF" --no-edit
echo "Last commits:"
git log --oneline -n 16
- name: Create branch
env:
REF_NAME: ${{ github.event.inputs.branch || github.ref_name }}
run: |
[ -n "$REF_NAME" ] && git checkout -b "ci/$REF_NAME"
git status
- name: Cache node_modules
uses: actions/cache@v3
env:
cache-name: app-node_modules
with:
path: App/node_modules
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('App/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Yarn install
run: |
cd App
yarn install
- name: Get Changelog
uses: actions/download-artifact@v3
with:
name: changelog
path: App
- name: Prepare config.xcconfig
run: |
echo "${{ secrets.CONFIG_XCCONFIG }}" > App/ios/config.xcconfig
echo "MARKETING_VERSION = 0.1.2" >> App/ios/config.xcconfig
echo "CURRENT_PROJECT_VERSION = 10" >> App/ios/config.xcconfig
echo "${{ secrets.AUTHKEY_P8_BASE64 }}" > ~/AuthKey.p8.base64
base64 --decode ~/AuthKey.p8.base64 > ~/AuthKey.p8
- name: Cache Pods
uses: actions/cache@v3
env:
cache-name: app-pods
with:
path: App/ios/Pods
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('App/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
- name: Pod install
env:
USE_BUILDCACHE: true
run: |
cd App
bash scripts/pod-install.sh
- name: Install Fastlane
run: |
cd App/ios
bundle install
# Patch cert_checker.rb to not print out sensitive information.
# See: https://github.com/fastlane/fastlane/issues/21351
FASTLANE_PATH="$(bundle show fastlane)"
FASTLANE_PATH_CERT_CHECKER_PATH="$FASTLANE_PATH/fastlane_core/lib/fastlane_core/cert_checker.rb"
if [[ -f "$FASTLANE_PATH_CERT_CHECKER_PATH" ]]; then
patch --force "$FASTLANE_PATH_CERT_CHECKER_PATH" < fastlane/cert_checker.patch
else
exit 1
fi
- name: Set Sync Code Signing Git SSH key
env:
SYNC_CODE_SIGNING_GIT_SSH_KEY: ${{ secrets.SYNC_CODE_SIGNING_GIT_SSH_KEY }}
run: |
ssh-agent sh -c 'echo "$SYNC_CODE_SIGNING_GIT_SSH_KEY"' | ssh-add -
- uses: mikehardy/buildcache-action@v2
with:
cache_key: release
- name: Fastlane Release
env:
CI: true
SYNC_CODE_SIGNING_GIT_URL: ${{ secrets.SYNC_CODE_SIGNING_GIT_URL }}
# The passphrase to decrypt the profiles stored in Git repo.
# See: https://docs.fastlane.tools/actions/sync_code_signing/#passphrase
MATCH_PASSWORD: ${{ secrets.SYNC_CODE_SIGNING_GIT_PASSPHRASE }}
SKIP_UPLOAD_TO_TESTFLIGHT: true
run: |
cd App/ios
bundle exec fastlane release
- name: Show error log
if: ${{ failure() && github.event_name == 'release' }}
run: |
cat '/Users/runner/Library/Logs/gym/Inventory-Inventory.log' || :
- name: Upload App to TestFlight
continue-on-error: true
timeout-minutes: 10
env:
CI: true
run: |
cd App/ios
bundle exec fastlane lane_upload_to_testflight
cp ci_output_data.json ios_appstore_upload_info_release.json
- name: Upload App Store Upload Info
uses: actions/upload-artifact@v3
with:
name: ios-appstore-upload-info-release
path: |
App/ios/ios_appstore_upload_info_release.json
- name: Upload Archive
uses: actions/upload-artifact@v3
with:
name: ios-archive-release
path: |
App/ios/*.xcarchive
App/ios/*.xcarchive.zip
App/*.xcarchive
App/*.xcarchive.zip
publish:
runs-on: ubuntu-latest
name: Publish
needs:
- build-ios-nightly
- build-ios-release
- build-android
if: ${{ always() }}
permissions:
pull-requests: write
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.15.0
- name: Checkout code
uses: actions/checkout@v4
- name: Download Android Build Info
uses: actions/download-artifact@v3
continue-on-error: true
with:
name: android-build-info
- name: Download iOS App Store Nightly Upload Info
uses: actions/download-artifact@v3
continue-on-error: true
with:
name: ios-appstore-upload-info-nightly
- name: Download iOS App Store Release Upload Info
if: ${{ github.events.inputs.build-release || inputs.build-release }}
uses: actions/download-artifact@v3
continue-on-error: true
with:
name: ios-appstore-upload-info-release
- name: Generate PR comment
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' || startsWith(github.event.inputs.branch, 'pr/') }}
id: generate_pr_comment
env:
INPUT_BRANCH: ${{ github.event.inputs.branch }}
# See: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
GITHUB_CONTEXT: ${{ toJSON(github) }}
run: |
OUTPUT="$(node .github/workflows/scripts/generate-app-build-pr-comment.js "$GITHUB_CONTEXT" "$INPUT_BRANCH")"
if [[ -n "$OUTPUT" ]]; then
echo "$OUTPUT" >> $GITHUB_OUTPUT
fi
- name: Comment on PR
if: ${{ steps.generate_pr_comment.outputs.pr-comment && steps.generate_pr_comment.outputs.pr-number }}
uses: thollander/actions-comment-pull-request@v2
with:
pr_number: ${{ steps.generate_pr_comment.outputs.pr-number }}
message: ${{ steps.generate_pr_comment.outputs.pr-comment }}
comment_tag: ${{ github.workflow }}-${{ github.run_number }}
reactions: rocket