|
94 | 94 | # - Compare results. |
95 | 95 | # - Add workflow summary. |
96 | 96 | # - Set the base sha. |
97 | | - # - Set commit details. |
98 | 97 | # - Publish performance results. |
99 | 98 | # - Ensure version-controlled files are not modified or deleted. |
100 | 99 | performance: |
@@ -312,23 +311,12 @@ jobs: |
312 | 311 | const baseRef = await github.rest.git.getRef({ owner: context.repo.owner, repo: context.repo.repo, ref: 'tags/${{ env.BASE_TAG }}' }); |
313 | 312 | return baseRef.data.object.sha; |
314 | 313 |
|
315 | | - - name: Set commit details |
316 | | - # Only needed when publishing results. |
317 | | - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached }} |
318 | | - uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 |
319 | | - id: commit-timestamp |
320 | | - with: |
321 | | - github-token: ${{ secrets.GITHUB_TOKEN }} |
322 | | - script: | |
323 | | - const commit_details = await github.rest.git.getCommit({ owner: context.repo.owner, repo: context.repo.repo, commit_sha: context.sha }); |
324 | | - return parseInt((new Date( commit_details.data.author.date ).getTime() / 1000).toFixed(0)) |
325 | | -
|
326 | 314 | - name: Publish performance results |
327 | 315 | # Only publish results on pushes to trunk. |
328 | 316 | if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached }} |
329 | 317 | env: |
330 | 318 | BASE_SHA: ${{ steps.base-sha.outputs.result }} |
331 | | - COMMITTED_AT: ${{ steps.commit-timestamp.outputs.result }} |
| 319 | + COMMITTED_AT: $(git show -s $GITHUB_SHA --format="%cI") |
332 | 320 | CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }} |
333 | 321 | HOST_NAME: "www.codevitals.run" |
334 | 322 | run: | |
|
0 commit comments