File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111jobs :
1212 compile :
1313 runs-on : ubuntu-latest
14- outputs :
15- compilation_outputs : ${{ steps.compile.outputs.result }}
1614 steps :
1715 - uses : actions/checkout@v4
1816 - run : |
19- echo "result=<<EOF" >> $GITHUB_OUTPUT
20- g++ -o test source.cpp 2>&1 >> $GITHUB_OUTPUT
21- echo "EOF" >> $GITHUB_OUTPUT
22- id: compile
17+ g++ -o test source.cpp 2>&1 > compilation.log
18+ - uses : actions/upload-artifact@v3
19+ with :
20+ name : compilation_log
21+ path : compilation.log
2322 - run : ./test
2423
2524 test :
3332 node-version : 20
3433 - run : npm install
3534 - run : npm run build
35+ - uses : actions/download-artifact@v3
36+ with :
37+ name : compilation_log
3638 - run : node dist/index.js
3739 env :
3840 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39- COMPILATION_OUTPUTS : ${{ needs.compile.outputs.compilation_outputs }}
Original file line number Diff line number Diff line change 11import { Octokit } from "@octokit/action" ;
2+ import { readFileSync } from "fs" ;
23
34const octokit = new Octokit ( ) ;
45
56const [ owner , repo ] = process . env . GITHUB_REPOSITORY ?. split ( "/" ) ! ;
67const pull_request_number = parseInt ( process . env . GITHUB_REF ?. split ( "/" ) [ 2 ] ! ) ;
7- const compilation_output = process . env . COMPILATION_OUTPUT ! ;
8-
8+ const compilation_output = readFileSync ( "compilation.log" ) ;
99const { data : pullRequest } = await octokit . rest . pulls . get ( {
1010 owner,
1111 repo,
You can’t perform that action at this time.
0 commit comments