11
11
commit_sha :
12
12
required : false
13
13
type : string
14
+ force :
15
+ description : ' Force a commit to the builds/... branches'
16
+ required : true
17
+ default : false
18
+ type : boolean
14
19
15
20
env :
16
21
TZ : /usr/share/zoneinfo/America/Los_Angeles
@@ -196,6 +201,7 @@ jobs:
196
201
grep -rl "$CURRENT_VERSION_MODERN" ./compiled | xargs -r sed -i -e "s/$CURRENT_VERSION_MODERN/$LAST_VERSION_MODERN/g"
197
202
grep -rl "$CURRENT_VERSION_MODERN" ./compiled || echo "Modern version reverted"
198
203
- name : Check for changes
204
+ if : !inputs.force
199
205
id : check_should_commit
200
206
run : |
201
207
echo "Full git status"
@@ -213,7 +219,7 @@ jobs:
213
219
echo "should_commit=false" >> "$GITHUB_OUTPUT"
214
220
fi
215
221
- name : Re-apply version changes
216
- if : steps.check_should_commit.outputs.should_commit == 'true' && needs.download_artifacts.outputs.last_version_classic != '' && needs.download_artifacts.outputs.last_version_modern != ''
222
+ if : inputs.force || ( steps.check_should_commit.outputs.should_commit == 'true' && needs.download_artifacts.outputs.last_version_classic != '' && needs.download_artifacts.outputs.last_version_modern != '')
217
223
env :
218
224
CURRENT_VERSION_CLASSIC : ${{ needs.download_artifacts.outputs.current_version_classic }}
219
225
CURRENT_VERSION_MODERN : ${{ needs.download_artifacts.outputs.current_version_modern }}
@@ -230,12 +236,12 @@ jobs:
230
236
grep -rl "$LAST_VERSION_MODERN" ./compiled | xargs -r sed -i -e "s/$LAST_VERSION_MODERN/$CURRENT_VERSION_MODERN/g"
231
237
grep -rl "$LAST_VERSION_MODERN" ./compiled || echo "Classic version re-applied"
232
238
- name : Will commit these changes
233
- if : steps.check_should_commit.outputs.should_commit == 'true'
239
+ if : inputs.force || steps.check_should_commit.outputs.should_commit == 'true'
234
240
run : |
235
241
echo ":"
236
242
git status -u
237
243
- name : Commit changes to branch
238
- if : steps.check_should_commit.outputs.should_commit == 'true'
244
+ if : inputs.force || steps.check_should_commit.outputs.should_commit == 'true'
239
245
uses : stefanzweifel/git-auto-commit-action@v4
240
246
with :
241
247
commit_message : |
@@ -272,6 +278,7 @@ jobs:
272
278
grep -rl "$CURRENT_VERSION" ./compiled-rn | xargs -r sed -i -e "s/$CURRENT_VERSION/$LAST_VERSION/g"
273
279
grep -rl "$CURRENT_VERSION" ./compiled-rn || echo "Version reverted"
274
280
- name : Check for changes
281
+ if : !inputs.force
275
282
id : check_should_commit
276
283
run : |
277
284
echo "Full git status"
@@ -290,7 +297,7 @@ jobs:
290
297
echo "should_commit=false" >> "$GITHUB_OUTPUT"
291
298
fi
292
299
- name : Re-apply version changes
293
- if : steps.check_should_commit.outputs.should_commit == 'true' && needs.download_artifacts.outputs.last_version_rn != ''
300
+ if : inputs.force || ( steps.check_should_commit.outputs.should_commit == 'true' && needs.download_artifacts.outputs.last_version_rn != '')
294
301
env :
295
302
CURRENT_VERSION : ${{ needs.download_artifacts.outputs.current_version_rn }}
296
303
LAST_VERSION : ${{ needs.download_artifacts.outputs.last_version_rn }}
@@ -300,12 +307,12 @@ jobs:
300
307
grep -rl "$LAST_VERSION" ./compiled-rn | xargs -r sed -i -e "s/$LAST_VERSION/$CURRENT_VERSION/g"
301
308
grep -rl "$LAST_VERSION" ./compiled-rn || echo "Version re-applied"
302
309
- name : Add files for signing
303
- if : steps.check_should_commit.outputs.should_commit == 'true'
310
+ if : inputs.force || steps.check_should_commit.outputs.should_commit == 'true'
304
311
run : |
305
312
echo ":"
306
313
git add .
307
314
- name : Signing files
308
- if : steps.check_should_commit.outputs.should_commit == 'true'
315
+ if : inputs.force || steps.check_should_commit.outputs.should_commit == 'true'
309
316
uses : actions/github-script@v7
310
317
with :
311
318
script : |
@@ -388,12 +395,12 @@ jobs:
388
395
console.error('Error signing files:', e);
389
396
}
390
397
- name : Will commit these changes
391
- if : steps.check_should_commit.outputs.should_commit == 'true'
398
+ if : inputs.force || steps.check_should_commit.outputs.should_commit == 'true'
392
399
run : |
393
400
git add .
394
401
git status
395
402
- name : Commit changes to branch
396
- if : steps.check_should_commit.outputs.should_commit == 'true'
403
+ if : inputs.force || steps.check_should_commit.outputs.should_commit == 'true'
397
404
uses : stefanzweifel/git-auto-commit-action@v4
398
405
with :
399
406
commit_message : |
0 commit comments