From 56835a5c4de01a565ecf0da03c873c493b5ebda9 Mon Sep 17 00:00:00 2001 From: Kevin Yue Date: Sat, 18 Apr 2026 21:42:12 +0800 Subject: [PATCH] ci: add 2.3.x pull request builds --- .github/workflows/build.yaml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c6410c3..b8e375d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,11 +14,23 @@ on: - release/* tags: - v*.*.* + pull_request: + paths-ignore: + - LICENSE + - "*.md" + - .vscode + - .devcontainer + branches: + - 2.3.x concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +env: + GP_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} + GPGUI_REF: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }} + jobs: # Include arm64 if ref is a tag setup-matrix: @@ -49,7 +61,7 @@ jobs: with: token: ${{ secrets.GH_PAT }} repository: yuezk/GlobalProtect-openconnect - ref: ${{ github.ref }} + ref: ${{ env.GP_REF }} path: source/gp submodules: recursive - name: Create tarball @@ -172,15 +184,15 @@ jobs: with: token: ${{ secrets.GH_PAT }} repository: yuezk/GlobalProtect-openconnect - ref: ${{ github.ref }} + ref: ${{ env.GP_REF }} path: gpgui-source/gp submodules: recursive - - name: Checkout gpgui@${{ github.ref_name }} + - name: Checkout gpgui@${{ env.GPGUI_REF }} uses: actions/checkout@v3 with: token: ${{ secrets.GH_PAT }} repository: yuezk/gpgui - ref: ${{ github.ref_name }} + ref: ${{ env.GPGUI_REF }} path: gpgui-source/gpgui - name: Tarball run: |