|
16 | 16 | required: true |
17 | 17 | default: false |
18 | 18 | type: boolean |
| 19 | + dry_run: |
| 20 | + description: Perform a dry run (run everything except push) |
| 21 | + required: true |
| 22 | + default: false |
| 23 | + type: boolean |
19 | 24 |
|
20 | 25 | env: |
21 | 26 | TZ: /usr/share/zoneinfo/America/Los_Angeles |
@@ -246,16 +251,16 @@ jobs: |
246 | 251 | git status -u |
247 | 252 | - name: Commit changes to branch |
248 | 253 | if: inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true' |
249 | | - uses: stefanzweifel/git-auto-commit-action@v5 |
250 | | - with: |
251 | | - commit_message: | |
252 | | - ${{ github.event.workflow_run.head_commit.message || format('Manual build of {0}', github.event.workflow_run.head_sha || github.sha) }} |
| 254 | + run: | |
| 255 | + git config --global user.email "${{ format('{0}@users.noreply.github.com', github.triggering_actor) }}" |
| 256 | + git config --global user.name "${{ github.triggering_actor }}" |
253 | 257 |
|
254 | | - DiffTrain build for [${{ github.event.workflow_run.head_sha || github.sha }}](https://github.com/facebook/react/commit/${{ github.event.workflow_run.head_sha || github.sha }}) |
255 | | - branch: builds/facebook-www |
256 | | - commit_user_name: ${{ github.triggering_actor }} |
257 | | - commit_user_email: ${{ format('{0}@users.noreply.github.com', github.triggering_actor) }} |
258 | | - create_branch: true |
| 258 | + git commit -m "${{ github.event.workflow_run.head_commit.message || format('Manual build of {0}', github.event.workflow_run.head_sha || github.sha) }} |
| 259 | +
|
| 260 | + DiffTrain build for [${{ github.event.workflow_run.head_sha || github.sha }}](https://github.com/facebook/react/commit/${{ github.event.workflow_run.head_sha || github.sha }})" || echo "No changes to commit" |
| 261 | + - name: Push changes to branch |
| 262 | + if: inputs.dry_run == false && (inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true') |
| 263 | + run: git push |
259 | 264 |
|
260 | 265 | commit_fbsource_artifacts: |
261 | 266 | needs: download_artifacts |
@@ -413,13 +418,13 @@ jobs: |
413 | 418 | git status |
414 | 419 | - name: Commit changes to branch |
415 | 420 | if: inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true' |
416 | | - uses: stefanzweifel/git-auto-commit-action@v5 |
417 | | - with: |
418 | | - commit_message: | |
419 | | - ${{ github.event.workflow_run.head_commit.message || format('Manual build of {0}', github.event.workflow_run.head_sha || github.sha) }} |
| 421 | + run: | |
| 422 | + git config --global user.email "${{ format('{0}@users.noreply.github.com', github.triggering_actor) }}" |
| 423 | + git config --global user.name "${{ github.triggering_actor }}" |
| 424 | +
|
| 425 | + git commit -m "${{ github.event.workflow_run.head_commit.message || format('Manual build of {0}', github.event.workflow_run.head_sha || github.sha) }} |
420 | 426 |
|
421 | | - DiffTrain build for [${{ github.event.workflow_run.head_sha || github.sha }}](https://github.com/facebook/react/commit/${{ github.event.workflow_run.head_sha || github.sha }}) |
422 | | - branch: builds/facebook-fbsource |
423 | | - commit_user_name: ${{ github.triggering_actor }} |
424 | | - commit_user_email: ${{ format('{0}@users.noreply.github.com', github.triggering_actor) }} |
425 | | - create_branch: true |
| 427 | + DiffTrain build for [${{ github.event.workflow_run.head_sha || github.sha }}](https://github.com/facebook/react/commit/${{ github.event.workflow_run.head_sha || github.sha }})" || echo "No changes to commit" |
| 428 | + - name: Push changes to branch |
| 429 | + if: inputs.dry_run == false && (inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true') |
| 430 | + run: git push |
0 commit comments