Skip to content

Commit 07e7192

Browse files
committed
Use F5 artifactory GOPROXY and self-hosted runners
1 parent 00112a4 commit 07e7192

File tree

6 files changed

+20
-3
lines changed

6 files changed

+20
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
2828
packages: write # for docker/build-push-action to push to GHCR
2929
id-token: write # for docker/login to login to NGINX registry
30-
runs-on: ${{ github.event_name != 'pull_request' && contains(inputs.image, 'plus') && 'kic-plus' || 'ubuntu-24.04' }}
30+
runs-on: ${{ github.repository_owner == 'nginx' && (github.ref_type == 'tag' || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
3131
services:
3232
registry:
3333
image: registry:3

.github/workflows/ci.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ defaults:
1717
run:
1818
shell: bash
1919

20+
env:
21+
GOPROXY: ${{ github.repository_owner == 'nginx' && format('https://{0}:{1}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev', secrets.ARTIFACTORY_USER, secrets.ARTIFACTORY_TOKEN) || 'direct' }}
22+
2023
concurrency:
2124
group: ${{ github.ref_name }}-ci
2225
cancel-in-progress: true
@@ -128,7 +131,7 @@ jobs:
128131

129132
binary:
130133
name: Build Binary
131-
runs-on: ubuntu-24.04
134+
runs-on: ${{ github.repository_owner == 'nginx' && (github.ref_type == 'tag' || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
132135
needs: [vars, unit-tests, njs-unit-tests]
133136
permissions:
134137
contents: write # for goreleaser/goreleaser-action and lucacome/draft-release to create/update releases
@@ -148,6 +151,12 @@ jobs:
148151
go.sum
149152
.github/.cache/buster-for-binary
150153
154+
- name: Set Go module cache
155+
run: |
156+
mkdir -p ${{ github.workspace }}/.gocache
157+
echo "GOMODCACHE=${{ github.workspace }}/.gocache" >> $GITHUB_ENV
158+
echo "GOCACHE=${{ github.workspace }}/.gocache" >> $GITHUB_ENV
159+
151160
- name: Create/Update Draft
152161
uses: lucacome/draft-release@00f74370c044c322da6cb52acc707d62c7762c71 # v1.2.4
153162
with:
@@ -285,7 +294,7 @@ jobs:
285294

286295
publish-helm:
287296
name: Package and Publish Helm Chart
288-
runs-on: ubuntu-24.04
297+
runs-on: ${{ github.repository_owner == 'nginx' && (github.ref_type == 'tag' || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
289298
needs: [vars, helm-tests]
290299
if: ${{ github.event_name == 'push' && ! startsWith(github.ref, 'refs/heads/release-') }}
291300
permissions:

.github/workflows/conformance.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ defaults:
2020
env:
2121
PLUS_USAGE_ENDPOINT: ${{ secrets.JWT_PLUS_REPORTING_ENDPOINT }}
2222
ENABLE_EXPERIMENTAL: ${{ inputs.enable-experimental }}
23+
GOPROXY: ${{ github.repository_owner == 'nginx' && format('https://{0}:{1}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev', secrets.ARTIFACTORY_USER, secrets.ARTIFACTORY_TOKEN) || 'direct' }}
2324

2425
permissions:
2526
contents: read

.github/workflows/functional.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ defaults:
1616

1717
env:
1818
PLUS_USAGE_ENDPOINT: ${{ secrets.JWT_PLUS_REPORTING_ENDPOINT }}
19+
GOPROXY: ${{ github.repository_owner == 'nginx' && format('https://{0}:{1}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev', secrets.ARTIFACTORY_USER, secrets.ARTIFACTORY_TOKEN) || 'direct' }}
1920

2021
permissions:
2122
contents: read

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ defaults:
1212
run:
1313
shell: bash
1414

15+
env:
16+
GOPROXY: ${{ github.repository_owner == 'nginx' && format('https://{0}:{1}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev', secrets.ARTIFACTORY_USER, secrets.ARTIFACTORY_TOKEN) || 'direct' }}
17+
1518
concurrency:
1619
group: ${{ github.ref_name }}-lint
1720
cancel-in-progress: true

.github/workflows/renovate-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ defaults:
1111
run:
1212
shell: bash
1313

14+
env:
15+
GOPROXY: ${{ github.repository_owner == 'nginx' && format('https://{0}:{1}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev', secrets.ARTIFACTORY_USER, secrets.ARTIFACTORY_TOKEN) || 'direct' }}
16+
1417
concurrency:
1518
group: ${{ github.ref_name }}-renovate
1619
cancel-in-progress: true

0 commit comments

Comments
 (0)