Skip to content

Commit 4facdf8

Browse files
committed
[ci] Properly format commit message take 2
We need to use the commit message from `main`, not the builds branch
1 parent db7dfe0 commit 4facdf8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/runtime_commit_artifacts.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,9 @@ jobs:
252252
git config --global user.email "${{ format('{0}@users.noreply.github.com', github.triggering_actor) }}"
253253
git config --global user.name "${{ github.triggering_actor }}"
254254
255-
git commit -m "$(git show --no-patch --pretty=format:'%B%n%nDiffTrain 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"
255+
git commit -m "$(git show ${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha }} --no-patch --pretty=format:'%B%n%nDiffTrain build for [${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha }}](https://github.com/facebook/react/commit/${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha}})')" || echo "No changes to commit"
256+
env:
257+
COMMIT_MSG: ${{ github.event.workflow_run.head_commit.message }}
256258
- name: Push changes to branch
257259
if: inputs.dry_run == false && (inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true')
258260
run: git push
@@ -417,7 +419,7 @@ jobs:
417419
git config --global user.email "${{ format('{0}@users.noreply.github.com', github.triggering_actor) }}"
418420
git config --global user.name "${{ github.triggering_actor }}"
419421
420-
git commit -m "$(git show --no-patch --pretty=format:'%B%n%nDiffTrain 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"
422+
git commit -m "$(git show ${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha }} --no-patch --pretty=format:'%B%n%nDiffTrain build for [${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha }}](https://github.com/facebook/react/commit/${{ inputs.commit_sha || github.event.workflow_run.head_sha || github.sha}})')" || echo "No changes to commit"
421423
- name: Push changes to branch
422424
if: inputs.dry_run == false && (inputs.force == true || steps.check_should_commit.outputs.should_commit == 'true')
423425
run: git push

0 commit comments

Comments
 (0)