diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3644623448..2b3d6a97f3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: security-events: write # for github/codeql-action/upload-sarif to upload SARIF results packages: write # for docker/build-push-action to push to GHCR id-token: write # for docker/login to login to NGINX registry - runs-on: ${{ github.event_name != 'pull_request' && contains(inputs.image, 'plus') && 'kic-plus' || 'ubuntu-24.04' }} + 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' }} services: registry: image: registry:3 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 552d434da6..93dd14c309 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,9 @@ defaults: run: shell: bash +env: + 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' }} + concurrency: group: ${{ github.ref_name }}-ci cancel-in-progress: true @@ -128,7 +131,7 @@ jobs: binary: name: Build Binary - runs-on: ubuntu-24.04 + 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' }} needs: [vars, unit-tests, njs-unit-tests] permissions: contents: write # for goreleaser/goreleaser-action and lucacome/draft-release to create/update releases @@ -148,6 +151,12 @@ jobs: go.sum .github/.cache/buster-for-binary + - name: Set Go module cache + run: | + mkdir -p ${{ github.workspace }}/.gocache + echo "GOMODCACHE=${{ github.workspace }}/.gocache" >> $GITHUB_ENV + echo "GOCACHE=${{ github.workspace }}/.gocache" >> $GITHUB_ENV + - name: Create/Update Draft uses: lucacome/draft-release@00f74370c044c322da6cb52acc707d62c7762c71 # v1.2.4 with: @@ -285,7 +294,7 @@ jobs: publish-helm: name: Package and Publish Helm Chart - runs-on: ubuntu-24.04 + 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' }} needs: [vars, helm-tests] if: ${{ github.event_name == 'push' && ! startsWith(github.ref, 'refs/heads/release-') }} permissions: diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 00654ae10d..6f8f6faa60 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -20,6 +20,7 @@ defaults: env: PLUS_USAGE_ENDPOINT: ${{ secrets.JWT_PLUS_REPORTING_ENDPOINT }} ENABLE_EXPERIMENTAL: ${{ inputs.enable-experimental }} + 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' }} permissions: contents: read diff --git a/.github/workflows/functional.yml b/.github/workflows/functional.yml index 6273724bfe..6cc8f2f47e 100644 --- a/.github/workflows/functional.yml +++ b/.github/workflows/functional.yml @@ -16,6 +16,7 @@ defaults: env: PLUS_USAGE_ENDPOINT: ${{ secrets.JWT_PLUS_REPORTING_ENDPOINT }} + 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' }} permissions: contents: read diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 281962e70c..77eda7dd6a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,6 +12,9 @@ defaults: run: shell: bash +env: + 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' }} + concurrency: group: ${{ github.ref_name }}-lint cancel-in-progress: true diff --git a/.github/workflows/renovate-build.yml b/.github/workflows/renovate-build.yml index 13bca21d8c..b8bf854024 100644 --- a/.github/workflows/renovate-build.yml +++ b/.github/workflows/renovate-build.yml @@ -11,6 +11,9 @@ defaults: run: shell: bash +env: + 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' }} + concurrency: group: ${{ github.ref_name }}-renovate cancel-in-progress: true