ci: checkout unifi discover-flag when go.mod has replace => ../unifi

So Build (test + lint) passes on PRs that depend on unifi with DiscoverEndpoints.
This commit is contained in:
brngates98
2026-01-30 20:19:05 -05:00
parent 9cfb732c11
commit 8d3d983844

View File

@@ -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: