From 6744bac94dc7441b33abd33147bdcd9164d472f3 Mon Sep 17 00:00:00 2001 From: Sean Breen Date: Thu, 24 Jul 2025 14:56:24 +0100 Subject: [PATCH 1/3] Add direct fallback if go proxy fails --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82308d0fe..802328aa9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ permissions: env: NFPM_VERSION: 'v2.35.3' - GOPROXY: "https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev" + GOPROXY: "https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev|direct" jobs: lint: From 8810e68e9054dc983c6aff73d6a336dfe4a13d49 Mon Sep 17 00:00:00 2001 From: Sean Breen Date: Thu, 24 Jul 2025 15:28:51 +0100 Subject: [PATCH 2/3] set GOPROXY to direct in cases where secrets re not present, or the repo is a fork --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 802328aa9..207f1c748 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,9 +20,19 @@ permissions: env: NFPM_VERSION: 'v2.35.3' - GOPROXY: "https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev|direct" + GOPROXY: "https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev" jobs: + set-vars: + runs-on: ubuntu-22.04 + steps: + - name: Set Variables + run: | + if [[ -z ${{ secrets.ARTIFACTORY_USER }} ]] || + [[ -z ${{ secrets.ARTIFACTORY_TOKEN }} ]] || + ${{ github.event.pull_request.head.repo.fork }}; then + echo "GOPROXY=direct" >> $GITHUB_ENV + lint: name: Lint runs-on: ubuntu-22.04 From 94d980d74f78409c82f9a3cf59578ff6e18a29bc Mon Sep 17 00:00:00 2001 From: Sean Breen Date: Thu, 24 Jul 2025 15:31:54 +0100 Subject: [PATCH 3/3] Add missing closing fi --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 207f1c748..da6b59f56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,6 +32,7 @@ jobs: [[ -z ${{ secrets.ARTIFACTORY_TOKEN }} ]] || ${{ github.event.pull_request.head.repo.fork }}; then echo "GOPROXY=direct" >> $GITHUB_ENV + fi lint: name: Lint