From 8d3d98384409269303890b8fc9d91ea5f5b3f8ea Mon Sep 17 00:00:00 2001 From: brngates98 Date: Fri, 30 Jan 2026 20:19:05 -0500 Subject: [PATCH] ci: checkout unifi discover-flag when go.mod has replace => ../unifi So Build (test + lint) passes on PRs that depend on unifi with DiscoverEndpoints. --- .github/workflows/build.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d669821..01c17a04 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,12 @@ jobs: steps: - uses: actions/checkout@v6 + - name: Checkout unifi (when go.mod replace => ../unifi) + run: | + if grep -q 'replace github.com/unpoller/unifi/v5 => ../unifi' go.mod; then + git clone --depth 1 https://github.com/brngates98/unifi.git ../unifi -b discover-flag + fi + - name: Set up Go uses: actions/setup-go@v6 with: @@ -39,6 +45,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v6 + + - name: Checkout unifi (when go.mod replace => ../unifi) + run: | + if grep -q 'replace github.com/unpoller/unifi/v5 => ../unifi' go.mod; then + git clone --depth 1 https://github.com/brngates98/unifi.git ../unifi -b discover-flag + fi + - name: Set up Go uses: actions/setup-go@v6 with: