Skip to content

Commit 611de25

Browse files
committed
TEMP test full workflow (without pushing)
1 parent 5e0b317 commit 611de25

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
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.repository_owner == 'nginx' && (github.ref_type == 'tag' || (github.event_name == 'push' && github.ref == 'refs/heads/main')) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
30+
runs-on: ${{ github.repository_owner == 'nginx' && (github.ref_type == 'tag' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/chore/secure-build-pipeline'))) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
3131
services:
3232
registry:
3333
image: registry:3
@@ -140,7 +140,7 @@ jobs:
140140
tags: ${{ steps.meta.outputs.tags }}
141141
labels: ${{ steps.meta.outputs.labels }}
142142
annotations: ${{ steps.meta.outputs.annotations }}
143-
push: true
143+
push: false
144144
platforms: ${{ inputs.platforms }}
145145
cache-from: type=gha,scope=${{ inputs.image }}
146146
cache-to: type=gha,scope=${{ inputs.image }},mode=max

.github/workflows/ci.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
- release-*
8+
- chore/secure-build-pipeline
89
tags:
910
- "v[0-9]+.[0-9]+.[0-9]+*"
1011
pull_request:
@@ -18,7 +19,7 @@ defaults:
1819
shell: bash
1920

2021
env:
21-
GOPROXY: ${{ github.repository_owner == 'nginx' && ((github.event_name == 'push' && github.ref == 'refs/heads/main') || github.ref_type == 'tag') && format('https://{0}:{1}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-local-approved-dependency', secrets.ARTIFACTORY_USER, secrets.ARTIFACTORY_TOKEN) || 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+
GOPROXY: ${{ github.repository_owner == 'nginx' && ((github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/chore/secure-build-pipeline')) || github.ref_type == 'tag') && format('https://{0}:{1}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-local-approved-dependency', secrets.ARTIFACTORY_USER, secrets.ARTIFACTORY_TOKEN) || github.repository_owner == 'nginx' && format('https://{0}:{1}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev,direct', secrets.ARTIFACTORY_USER, secrets.ARTIFACTORY_TOKEN) || 'direct' }}
2223

2324
concurrency:
2425
group: ${{ github.ref_name }}-ci
@@ -31,6 +32,9 @@ jobs:
3132
vars:
3233
name: Checks and variables
3334
runs-on: ubuntu-24.04
35+
env:
36+
# Use dev GOPROXY with fallback for CI checks (not production artifacts)
37+
GOPROXY: ${{ github.repository_owner == 'nginx' && format('https://{0}:{1}@azr.artifactory.f5net.com/artifactory/api/go/f5-nginx-go-dev,direct', secrets.ARTIFACTORY_USER, secrets.ARTIFACTORY_TOKEN) || 'direct' }}
3438
outputs:
3539
go_path: ${{ steps.vars.outputs.go_path }}
3640
min_k8s_version: ${{ steps.vars.outputs.min_k8s_version }}
@@ -131,7 +135,7 @@ jobs:
131135

132136
binary:
133137
name: Build Binary
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' }}
138+
runs-on: ${{ github.repository_owner == 'nginx' && (github.ref_type == 'tag' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/chore/secure-build-pipeline'))) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
135139
needs: [vars, unit-tests, njs-unit-tests]
136140
permissions:
137141
contents: write # for goreleaser/goreleaser-action and lucacome/draft-release to create/update releases
@@ -151,6 +155,12 @@ jobs:
151155
go.sum
152156
.github/.cache/buster-for-binary
153157
158+
- name: Set Go module cache
159+
run: |
160+
mkdir -p ${{ github.workspace }}/.gocache
161+
echo "GOMODCACHE=${{ github.workspace }}/.gocache" >> $GITHUB_ENV
162+
echo "GOCACHE=${{ github.workspace }}/.gocache" >> $GITHUB_ENV
163+
154164
- name: Create/Update Draft
155165
uses: lucacome/draft-release@00f74370c044c322da6cb52acc707d62c7762c71 # v1.2.4
156166
with:
@@ -161,7 +171,7 @@ jobs:
161171
notes-header: |
162172
*Below is the auto-generated changelog, which includes all PRs that went into the release.
163173
For a shorter version that highlights only important changes, see [CHANGELOG.md](https://github.com/nginx/nginx-gateway-fabric/blob/{{version}}/CHANGELOG.md).*
164-
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' }}
174+
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' && github.ref != 'refs/heads/chore/secure-build-pipeline' }}
165175

166176
- name: Download Syft
167177
uses: anchore/sbom-action/download-syft@7b36ad622f042cab6f59a75c2ac24ccb256e9b45 # v0.20.4
@@ -175,14 +185,14 @@ jobs:
175185
uses: goreleaser/goreleaser-action@9c156ee8a17a598857849441385a2041ef570552 # v6.3.0
176186
with:
177187
version: v2.11.2 # renovate: datasource=github-tags depName=goreleaser/goreleaser
178-
args: ${{ github.ref_type == 'tag' && 'release' || 'build --snapshot' }} --clean
188+
args: ${{ github.ref_type == 'tag' && github.ref != 'refs/heads/chore/secure-build-pipeline' && 'release' || 'build --snapshot' }} --clean
179189
env:
180190
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
181191
GOPATH: ${{ needs.vars.outputs.go_path }}
182-
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
183-
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }}
184-
AZURE_BUCKET_NAME: ${{ secrets.AZURE_BUCKET_NAME }}
185-
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_COMMUNITY }}
192+
AZURE_STORAGE_ACCOUNT: ${{ github.ref != 'refs/heads/chore/secure-build-pipeline' && secrets.AZURE_STORAGE_ACCOUNT || '' }}
193+
AZURE_STORAGE_KEY: ${{ github.ref != 'refs/heads/chore/secure-build-pipeline' && secrets.AZURE_STORAGE_KEY || '' }}
194+
AZURE_BUCKET_NAME: ${{ github.ref != 'refs/heads/chore/secure-build-pipeline' && secrets.AZURE_BUCKET_NAME || '' }}
195+
SLACK_WEBHOOK: ${{ github.ref != 'refs/heads/chore/secure-build-pipeline' && secrets.SLACK_WEBHOOK_COMMUNITY || '' }}
186196
TELEMETRY_ENDPOINT: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release-') && 'oss-dev.edge.df.f5.com:443' || 'oss.edge.df.f5.com:443' }}
187197
TELEMETRY_ENDPOINT_INSECURE: "false"
188198

@@ -288,9 +298,9 @@ jobs:
288298

289299
publish-helm:
290300
name: Package and Publish Helm Chart
291-
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' }}
301+
runs-on: ${{ github.repository_owner == 'nginx' && (github.ref_type == 'tag' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/chore/secure-build-pipeline'))) && 'ubuntu-24.04-amd64' || 'ubuntu-24.04' }}
292302
needs: [vars, helm-tests]
293-
if: ${{ github.event_name == 'push' && ! startsWith(github.ref, 'refs/heads/release-') }}
303+
if: ${{ github.event_name == 'push' && ! startsWith(github.ref, 'refs/heads/release-') && github.ref != 'refs/heads/chore/secure-build-pipeline' }}
294304
permissions:
295305
contents: read
296306
packages: write # for helm to push to GHCR

0 commit comments

Comments
 (0)