Skip to content

Commit e53668e

Browse files
committed
Restore goproxy and use tagged version
1 parent 26f1b86 commit e53668e

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,16 @@ jobs:
5454
- name: Configure GOPROXY
5555
id: goproxy
5656
run: |
57-
echo "Temp use prod artifactory"
58-
GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev"
57+
if [[ "${{ secrets.ARTIFACTORY_USER }}" == "" ]]; then
58+
echo "No Artifactory secrets available - using direct GOPROXY"
59+
GOPROXY_VALUE="direct"
60+
elif [[ "${{ inputs.is_production_release }}" == "true" ]] || [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/main" ]]; then
61+
echo "Production mode - using production Artifactory"
62+
GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_ENDPOINT }}"
63+
else
64+
echo "Development mode - using dev Artifactory"
65+
GOPROXY_VALUE="https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@${{ secrets.ARTIFACTORY_DEV_ENDPOINT }}"
66+
fi
5967
echo "goproxy=${GOPROXY_VALUE}" >> $GITHUB_OUTPUT
6068
echo "GOPROXY=${GOPROXY_VALUE}" >> $GITHUB_ENV
6169
@@ -152,7 +160,7 @@ jobs:
152160
runs-on: ${{ github.repository_owner == 'nginx' && (inputs.is_production_release || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
153161
needs: [vars, unit-tests, njs-unit-tests]
154162
env:
155-
GOPROXY: "https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-local-approved-dependency"
163+
GOPROXY: ${{ needs.vars.outputs.goproxy }}
156164
outputs:
157165
json: ${{ steps.gateway_binaries.outputs.json }}
158166
permissions:
@@ -247,8 +255,7 @@ jobs:
247255
contents: read
248256
id-token: write # for compliance-rules action to sign assertion doc
249257
env:
250-
GOPROXY: "https://${{ secrets.ARTIFACTORY_USER }}:${{ secrets.ARTIFACTORY_TOKEN }}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-local-approved-dependency"
251-
258+
GOPROXY: ${{ needs.vars.outputs.goproxy }}
252259
runs-on: ubuntu-24.04
253260
strategy:
254261
fail-fast: false
@@ -279,7 +286,7 @@ jobs:
279286
280287
- name: Generate Assertion Document
281288
id: assertiondoc
282-
uses: nginxinc/compliance-rules/.github/actions/assertion@main
289+
uses: nginxinc/compliance-rules/.github/actions/assertion@83e452166aaf0ad8f07caf91a4f1f903b3dea1e6
283290
with:
284291
artifact-name: ${{ github.event.repository.name }}_${{ github.sha }}_${{ github.run_number }}_${{ matrix.gateway.os }}_${{ matrix.gateway.arch }}
285292
artifact-digest: ${{ matrix.gateway.digest }}
@@ -294,12 +301,11 @@ jobs:
294301
artifactory-url: ${{ secrets.ARTIFACTORY_URL }}
295302
artifactory-repo: 'f5-nginx-go-local-approved-dependency'
296303
build-content-path: ${{ steps.godeps.outputs.goversionm }}
297-
log-level: DEBUG
298304
assertion-doc-file: assertion_${{ github.event.repository.name }}_${{ github.sha }}_${{ github.run_id }}_${{ github.run_number }}_${{ matrix.gateway.os }}_${{ matrix.gateway.arch }}.json
299305

300306
- name: Sign and Store Assertion Document
301307
id: sign
302-
uses: nginxinc/compliance-rules/.github/actions/sign@main
308+
uses: nginxinc/compliance-rules/.github/actions/sign@83e452166aaf0ad8f07caf91a4f1f903b3dea1e6
303309
with:
304310
assertion-doc: ${{ steps.assertiondoc.outputs.assertion-document-path }}
305311

0 commit comments

Comments
 (0)