Skip to content

Commit

Permalink
code block with env var
Browse files Browse the repository at this point in the history
  • Loading branch information
d-roak committed Sep 10, 2024
1 parent 67c0806 commit 482f255
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,16 @@ jobs:
cat benchmark.txt >> $GITHUB_OUTPUT
echo 'EOF' >> $GITHUB_OUTPUT
- uses: actions/github-script@v6
env:
BENCHMARK_RESULT: ${{ steps.benchmark-result.outputs.BENCHMARK_RESULT | utf8 }}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "```${{ steps.benchmark-result.outputs.BENCHMARK_RESULT }}```"
body: "\n\`\`\`\n${process.env.BENCHMARK_RESULT}\n\`\`\`"
})
- run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: branch
Expand Down

0 comments on commit 482f255

Please sign in to comment.