@@ -102,13 +102,13 @@ jobs:
102102 echo "chart_version=${HELM_CHART_VERSION}" >> $GITHUB_OUTPUT
103103 forked_workflow=${{ (github.event.pull_request && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name) || github.repository != 'nginx/kubernetes-ingress' }}
104104 echo "forked_workflow=${forked_workflow}" >> $GITHUB_OUTPUT
105- go_proxy="https://proxy.golang.org,direct"
106- if [ "$forked_workflow" = "false" ]; then
107- go_proxy="${{ secrets.ARTIFACTORY_DEV_ENDPOINT }}"
108- elif [ "${{ github.ref_name }}" = "main" ] || [[ "${{ github.ref_name }}" =~ "release-" ]]; then
109- go_proxy="${{ secrets.ARTIFACTORY_ENDPOINT }}"
105+ if [ "$forked_workflow" = "false" ] && [ "${{ github.ref_name }}" != "${{ github.event.repository.default_branch }}" ]; then
106+ echo "go_proxy=${{ secrets.ARTIFACTORY_DEV_ENDPOINT }}" >> $GITHUB_OUTPUT
107+ elif [ "${{ github.ref_name }}" = "${{ github.event.repository.default_branch }}" ] || [[ "${{ github.ref_name }}" =~ "release-" ]]; then
108+ echo "go_proxy=${{ secrets.ARTIFACTORY_ENDPOINT }}" >> $GITHUB_OUTPUT
109+ else
110+ echo "go_proxy=https://proxy.golang.org,direct" >> $GITHUB_OUTPUT
110111 fi
111- echo "go_proxy=${go_proxy}" >> $GITHUB_OUTPUT
112112 ./.github/scripts/variables.sh go_code_md5 >> $GITHUB_OUTPUT
113113 ./.github/scripts/variables.sh docker_md5 >> $GITHUB_OUTPUT
114114 ./.github/scripts/variables.sh build_tag >> $GITHUB_OUTPUT
@@ -241,6 +241,10 @@ jobs:
241241 make telemetry-schema && git diff --name-only --exit-code internal/telemetry
242242 if : ${{ needs.checks.outputs.binary_cache_hit != 'true' }}
243243
244+ - name : Cleanup netrc
245+ run : rm -f $HOME/.netrc
246+ if : ${{ always() }}
247+
244248 unit-tests :
245249 name : Unit Tests
246250 runs-on : ubuntu-24.04
@@ -290,6 +294,10 @@ jobs:
290294 install-go : false
291295 if : ${{ needs.checks.outputs.binary_cache_hit != 'true' && (inputs.run_tests && inputs.run_tests || true) }}
292296
297+ - name : Cleanup netrc
298+ run : rm -f $HOME/.netrc
299+ if : ${{ always() }}
300+
293301 build-artifacts :
294302 name : Build Artifacts
295303 needs : [checks, unit-tests, verify-codegen]
0 commit comments