Skip to content

Commit e7e5269

Browse files
authored
Merge branch 'main' into add_regex_for_path_matching
2 parents 895c15c + 405f544 commit e7e5269

File tree

170 files changed

+3686
-764
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+3686
-764
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
platforms:
77
required: true
88
type: string
9+
build-os:
10+
required: false
11+
type: string
12+
default: ''
913
image:
1014
required: true
1115
type: string
@@ -65,7 +69,7 @@ jobs:
6569
platforms: arm64
6670

6771
- name: Login to GitHub Container Registry
68-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
72+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
6973
if: ${{ github.event_name != 'pull_request' && ! contains(inputs.image, 'plus') }}
7074
with:
7175
registry: ghcr.io
@@ -82,7 +86,7 @@ jobs:
8286
if: ${{ github.event_name != 'pull_request' && contains(inputs.image, 'plus')}}
8387

8488
- name: Login to NGINX Registry
85-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
89+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
8690
with:
8791
registry: docker-mgmt.nginx.com
8892
username: ${{ steps.idtoken.outputs.id_token }}
@@ -99,7 +103,7 @@ jobs:
99103
if: ${{ github.event_name != 'pull_request' && contains(inputs.image, 'plus') }}
100104

101105
- name: Login to GAR
102-
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
106+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
103107
with:
104108
registry: us-docker.pkg.dev
105109
username: oauth2accesstoken
@@ -116,16 +120,17 @@ jobs:
116120
name=ghcr.io/${{ github.repository_owner }}/nginx-gateway-fabric/nginx,enable=${{ inputs.image == 'nginx' && github.event_name != 'pull_request' }}
117121
name=docker-mgmt.nginx.com/nginx-gateway-fabric/nginx-plus,enable=${{ inputs.image == 'plus' && github.event_name != 'pull_request' }}
118122
name=us-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/nginx-gateway-fabric/nginx-plus,enable=${{ inputs.image == 'plus' && github.event_name != 'pull_request' }}
123+
name=ghcr.io/${{ github.repository_owner }}/nginx-gateway-fabric/operator,enable=${{ inputs.image == 'operator' && github.event_name != 'pull_request' }}
119124
name=localhost:5000/nginx-gateway-fabric/${{ inputs.image }}
120125
flavor: |
121126
latest=${{ (inputs.tag != '' && 'true') || 'auto' }}
122127
tags: |
123-
type=semver,pattern={{version}}
124-
type=edge
125-
type=schedule
126-
type=ref,event=pr
127-
type=ref,event=branch,suffix=-rc,enable=${{ startsWith(github.ref, 'refs/heads/release') && inputs.tag == '' }}
128-
type=raw,value=${{ inputs.tag }},enable=${{ inputs.tag != '' }}
128+
type=semver,pattern={{version}},suffix=${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }}
129+
type=edge,suffix=${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }}
130+
type=schedule,suffix=${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }}
131+
type=ref,event=pr,suffix=${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }}
132+
type=ref,event=branch,suffix=-rc${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }},enable=${{ startsWith(github.ref, 'refs/heads/release') && inputs.tag == '' }}
133+
type=raw,value=${{ inputs.tag }},enable=${{ inputs.tag != '' }},suffix=${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }}
129134
labels: |
130135
org.opencontainers.image.documentation=https://docs.nginx.com/nginx-gateway-fabric
131136
org.opencontainers.image.vendor=NGINX Inc <[email protected]>
@@ -143,16 +148,16 @@ jobs:
143148
- name: Build Docker Image
144149
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
145150
with:
146-
file: build/Dockerfile${{ inputs.image == 'nginx' && '.nginx' || '' }}${{ inputs.image == 'plus' && '.nginxplus' || '' }}
151+
file: ${{ inputs.image == 'operator' && 'operators/Dockerfile' || (inputs.build-os != '' && format('build/{0}/Dockerfile{1}', inputs.build-os, inputs.image == 'nginx' && '.nginx' || inputs.image == 'plus' && '.nginxplus' || '') || format('build/Dockerfile{0}', inputs.image == 'nginx' && '.nginx' || inputs.image == 'plus' && '.nginxplus' || '')) }}
147152
context: "."
148153
target: ${{ inputs.image == 'ngf' && 'goreleaser' || '' }}
149154
tags: ${{ steps.meta.outputs.tags }}
150155
labels: ${{ steps.meta.outputs.labels }}
151156
annotations: ${{ steps.meta.outputs.annotations }}
152157
push: ${{ !inputs.dry_run }}
153158
platforms: ${{ inputs.platforms }}
154-
cache-from: type=gha,scope=${{ inputs.image }}
155-
cache-to: type=gha,scope=${{ inputs.image }},mode=max
159+
cache-from: type=gha,scope=${{ inputs.image }}${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }}
160+
cache-to: type=gha,scope=${{ inputs.image }}${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }},mode=max
156161
pull: true
157162
no-cache: ${{ github.event_name != 'pull_request' }}
158163
sbom: true
@@ -182,7 +187,7 @@ jobs:
182187
fail-build: false
183188

184189
- name: Upload scan result to GitHub Security tab
185-
uses: github/codeql-action/upload-sarif@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
190+
uses: github/codeql-action/upload-sarif@e296a935590eb16afc0c0108289f68c87e2a89a5 # v4.30.7
186191
if: ${{ !inputs.dry_run }}
187192
continue-on-error: true
188193
with:

0 commit comments

Comments
 (0)