diff --git a/.github/workflows/profile.yml b/.github/workflows/profile.yml index 2fb39ddbe9..af4f1e5814 100644 --- a/.github/workflows/profile.yml +++ b/.github/workflows/profile.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest if: ${{ !github.event.pull_request.head.repo.fork }} # comes from https://github.com/orgs/community/discussions/25217#discussioncomment-3246904 steps: - - uses: actions/checkout@v3.0.2 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Java @@ -57,10 +57,12 @@ jobs: mv .jvmopts_old .jvmopts cat .jvmopts - - name: Store flamegraphs + - name: Store flame graphs run: | - git config pull.rebase true - export REV=$(git rev-parse --short HEAD) + git config pull.rebase true + read REV COMMIT_DATE COMMIT_TIME COMMIT_TZ COMMIT_MSG <<< \ + $(git log --pretty=format:'%h %ad %s' --date=iso8601 -n 1 ${{ github.event.pull_request.head.sha }}) + HTML_LINE="
  • $COMMIT_DATE $COMMIT_TIME Flame graphs for $REV $COMMIT_MSG
  • " ls -al zio-kafka-bench/ mv zio-kafka-bench/zio.kafka.bench.* /tmp git clean -fdx @@ -70,9 +72,10 @@ jobs: mv /tmp/zio.kafka.bench.* dev/profile/$REV cd dev/profile find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "cd '{}' && tree -H . -o index.html" \; + sed -i'' -e '/NEW-FLAME-GRAPHS-GO-HERE/a\'$'\n'"$HTML_LINE"$'\n' index.html cd ../../ git config --global user.name "zio-kafka CI" git config --global user.email "ziokafkaci@users.noreply.github.com" git add . - git commit -m "flamegraphs for $REV" + git commit -m "Flame graphs for $REV" git push \ No newline at end of file