From: Soeren Apel Date: Sun, 25 Aug 2024 21:06:10 +0000 (+0200) Subject: build.yml: Check out PR instead of sigrok repo when needed X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=95ccd2fd7b412e0aca62a3b36e8dac6a06bfafae;p=sigrok-build.git build.yml: Check out PR instead of sigrok repo when needed --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 736d8c1..37e6429 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -353,12 +353,24 @@ jobs: source sigrok-appimage-init-toolchain.sh ./sigrok-appimage-build-dependencies.sh - - name: Checkout sigrok-cli + - name: Checkout sigrok's sigrok-cli + # Check out default sigrok-cli repository unless we're processing a pull request + if: (github.event_name != 'pull_request') uses: actions/checkout@v4 with: repository: sigrokproject/sigrok-cli path: sigrok-cli + - name: Checkout sigrok-cli from PR + # Check out sigrok-cli branch of the pull request we're processing + if: (github.event_name == 'pull_request') + uses: actions/checkout@v4 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + path: sigrok-cli + fetch-depth: 0 + - name: Build sigrok-cli run: | source sigrok-build/ci/appimage/sigrok-appimage-init-toolchain.sh