Skip to content

Commit

Permalink
[ci] replace short link url with PR comment
Browse files Browse the repository at this point in the history
Signed-off-by: Avimitin <[email protected]>
  • Loading branch information
Avimitin committed Dec 11, 2024
1 parent 10892ed commit 6882e1a
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/pd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,14 @@ jobs:
exit 1
fi
nix build --impure --out-link fc-result \
_OUTPUT_DIR="fc_result"
nix build --impure --out-link ${_OUTPUT_DIR} \
--override-input t1 "github:chipsalliance/t1/${T1_BRANCH}" \
"git+https://${GH_TOKEN}@${PD_URL}#prometheus.${T1_CONFIG}.tsn28-run-fc-rm.T1RocketTile"
_CODE_BLOCK='```'
echo "* Artifacts path: $(realpath fc-result)" >> "$GITHUB_STEP_SUMMARY"
echo "* Artifacts path: $(realpath ${_OUTPUT_DIR})" >> "$GITHUB_STEP_SUMMARY"
tee report.md <<-EOF
T1RocketTile PD Reports
=======================
Expand All @@ -103,27 +104,36 @@ jobs:
Timing
------
${_CODE_BLOCK}text
$(cat fc-result/timing_*.rpt)
$(cat ${_OUTPUT_DIR}/reports/timing_*.rpt)
${_CODE_BLOCK}
Area
----
${_CODE_BLOCK}text
$(cat fc-result/area.rpt)
$(cat ${_OUTPUT_DIR}/reports/area.rpt)
${_CODE_BLOCK}
Power
-----
${_CODE_BLOCK}text
$(cat fc-result/power.rpt)
$(cat ${_OUTPUT_DIR}/reports/power.rpt)
${_CODE_BLOCK}
Logic Level
-----------
${_CODE_BLOCK}text
$(cat fc-result/logic_levels.rpt)
$(cat ${_OUTPUT_DIR}/reports/logic_levels.rpt)
${_CODE_BLOCK}
EOF
echo "* Report Short link URL:" >> $GITHUB_STEP_SUMMARY
echo "<$(curl [email protected] -Fe=1M https://shz.al | jq -r .url)?lang=md>" >> $GITHUB_STEP_SUMMARY
- name: "Comment on PR"
uses: actions/github-script@v7
with:
script: |
const fs = require('fs')
const body = fs.readFileSync('report.md', 'utf-8')
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
})

0 comments on commit 6882e1a

Please sign in to comment.