From 47a5118a8b202858e78de0cbc72f8247dc493056 Mon Sep 17 00:00:00 2001 From: Josh Sanchez Date: Thu, 3 Apr 2025 21:38:24 -0500 Subject: [PATCH] CI: Checkout correct version of repo depending on whether build event is push or PR Target --- .github/workflows/build.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a509232d0..4875ab07f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -143,11 +143,21 @@ jobs: - name: Prepare run: cp -R /orig . + # Checkout the commit to generate OK bot report used for website build + - name: Checkout previous report repo state + if: ${{ github.event_name == 'push' }} + run: | + git checkout HEAD^ + + # Checkout the commit to generate CI progress report for PR comment report + - name: Checkout previous report repo state + if: ${{ github.event_name == 'pull_request_target' }} + run: | + git checkout main + # Generate report for previous repo state - name: Generate previous report - continue-on-error: true run: | - git checkout main python configure.py --version ${{ matrix.version }} \ --binutils /binutils --compilers /compilers ninja build/${{ matrix.version }}/report.json