summaryrefslogtreecommitdiffstatshomepage
path: root/.github
diff options
context:
space:
mode:
authorFelix Arntz <flixos90@git.wordpress.org>2025-01-06 21:19:51 +0000
committerFelix Arntz <flixos90@git.wordpress.org>2025-01-06 21:19:51 +0000
commit4a9a928dbcd1c91d3633c8de51614dd90d8ea0ac (patch)
tree61352db6020126cfb60931809d5f02d95060e83e /.github
parentd49258b6f77d2dbeba9846a71bc474c2ec9a7690 (diff)
downloadwordpress-4a9a928dbcd1c91d3633c8de51614dd90d8ea0ac.tar.gz
wordpress-4a9a928dbcd1c91d3633c8de51614dd90d8ea0ac.zip
Build/Test Tools: Fix incorrect commit time being reported to WordPress Code Vitals Dashboard.
2nd attempt of [59570]. Props mukesh27, ayeshrajans, swissspidy, desrosj. Fixes #62766. git-svn-id: https://develop.svn.wordpress.org/trunk@59582 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/reusable-performance.yml10
1 files changed, 2 insertions, 8 deletions
diff --git a/.github/workflows/reusable-performance.yml b/.github/workflows/reusable-performance.yml
index 61c40b80a4..f75cb6b3e4 100644
--- a/.github/workflows/reusable-performance.yml
+++ b/.github/workflows/reusable-performance.yml
@@ -331,20 +331,14 @@ jobs:
- name: Set commit details
# Only needed when publishing results.
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached && ! inputs.multisite }}
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
- id: commit-timestamp
- with:
- github-token: ${{ secrets.GITHUB_TOKEN }}
- script: |
- const commit_details = await github.rest.git.getCommit({ owner: context.repo.owner, repo: context.repo.repo, commit_sha: context.sha });
- return parseInt((new Date( commit_details.data.author.date ).getTime() / 1000).toFixed(0))
+ # Write to an environment variable to have the output available in later steps of the job.
+ run: echo "COMMITTED_AT=$(git show -s $GITHUB_SHA --format='%cI')" >> $GITHUB_ENV
- name: Publish performance results
# Only publish results on pushes to trunk.
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/trunk' && ! inputs.memcached && ! inputs.multisite }}
env:
BASE_SHA: ${{ steps.base-sha.outputs.result }}
- COMMITTED_AT: ${{ steps.commit-timestamp.outputs.result }}
CODEVITALS_PROJECT_TOKEN: ${{ secrets.CODEVITALS_PROJECT_TOKEN }}
HOST_NAME: "www.codevitals.run"
run: |