From fdc7b8b4105d85e92d794bc5c891cc0908037c23 Mon Sep 17 00:00:00 2001 From: Jerry Date: Tue, 5 Dec 2023 19:29:55 +0800 Subject: [PATCH] test-your-pr: fix bot comment again [skip ci] Signed-off-by: Jerry --- .github/workflows/test-your-pr.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-your-pr.yml b/.github/workflows/test-your-pr.yml index e8e2fd3..d13c459 100644 --- a/.github/workflows/test-your-pr.yml +++ b/.github/workflows/test-your-pr.yml @@ -9,6 +9,9 @@ jobs: name: Generate ROA runs-on: ubuntu-20.04 + outputs: + generate_roa: ${{ steps.generate_roa.outputs.base64 }} + steps: - uses: actions/checkout@v2 with: @@ -24,13 +27,18 @@ jobs: python-version: 3.x architecture: x64 - - shell: bash - run: | - env PYTHONUNBUFFERED=1 pip install -r scripts/requirements.txt 2> >(tee -a ~/buildjob.log >&2) + - run: pip install -r scripts/requirements.txt - - shell: bash - run: | - env PYTHONUNBUFFERED=1 scripts/generate-roa.sh 2> >(tee -a ~/buildjob.log >&2) + - run: | + success=true + + scripts/generate-roa.sh 2> >(tee ~/buildjob.log >&2) || success=false + + echo -n "base64=" >> $GITHUB_OUTPUT + base64 -w0 ~/buildjob.log >> $GITHUB_OUTPUT + ${success} + shell: bash + id: generate_roa - run: git -C generated diff README.md @@ -57,7 +65,7 @@ jobs: steps: - shell: bash run: | - tail ~/buildjob.log > ~/buildjob_tail.log + echo ${{needs.build.outputs.generate_roa}} | base64 -d |tail > ~/buildjob_tail.log || echo 'internal error' > ~/buildjob_tail.log - uses: thollander/actions-comment-pull-request@v2 with: