diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e80f3a5..063915c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,6 +7,7 @@ on: - .vscode - .devcontainer branches: + - 2.3.x - main - dev - hotfix/* @@ -14,11 +15,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,8 +62,9 @@ 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 run: | cd source/gp @@ -170,14 +184,15 @@ jobs: with: token: ${{ secrets.GH_PAT }} repository: yuezk/GlobalProtect-openconnect - ref: ${{ github.ref }} + ref: ${{ env.GP_REF }} path: gpgui-source/gp - - name: Checkout gpgui@${{ github.ref_name }} + submodules: recursive + - 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: |