Skip to content

Commit 0df3f7d

Browse files
authored
Fix goproxy for forks (#1183)
* Add direct fallback if go proxy fails * set GOPROXY to direct in cases where secrets re not present, or the repo is a fork * Add missing closing fi
1 parent 63664c0 commit 0df3f7d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,17 @@ env:
2323
GOPROXY: "https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev"
2424

2525
jobs:
26+
set-vars:
27+
runs-on: ubuntu-22.04
28+
steps:
29+
- name: Set Variables
30+
run: |
31+
if [[ -z ${{ secrets.ARTIFACTORY_USER }} ]] ||
32+
[[ -z ${{ secrets.ARTIFACTORY_TOKEN }} ]] ||
33+
${{ github.event.pull_request.head.repo.fork }}; then
34+
echo "GOPROXY=direct" >> $GITHUB_ENV
35+
fi
36+
2637
lint:
2738
name: Lint
2839
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)