From 244003cd419f7d085fda89e1f689df9fad5dc991 Mon Sep 17 00:00:00 2001 From: Ciara Stacke <18287516+ciarams87@users.noreply.github.com> Date: Wed, 22 Oct 2025 08:11:04 +0100 Subject: [PATCH 1/2] Fix helm tests in release pipeline (#4126) --- .github/workflows/build.yml | 2 +- .github/workflows/ci.yml | 1 + .github/workflows/helm.yml | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5e732b094..9bd0f85295 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: - ref: ${{ (inputs.tag != '' && !inputs.dry_run ) && format('refs/tags/v{0}', inputs.tag) || github.ref }} + ref: ${{ (inputs.tag != '' && !inputs.dry_run ) && format('refs/tags/{0}', inputs.tag) || github.ref }} - name: Download Artifacts uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c3b9a2932..698818bc88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -464,6 +464,7 @@ jobs: with: image: ${{ matrix.image }} k8s-version: ${{ matrix.k8s-version }} + tag: ${{ inputs.release_version || '' }} secrets: inherit if: ${{ needs.vars.outputs.helm_changes == 'true' || github.event_name == 'schedule' }} diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index 420b321cc4..cf6ad99843 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -9,6 +9,10 @@ on: k8s-version: required: true type: string + tag: + required: false + type: string + default: '' permissions: contents: read @@ -44,6 +48,8 @@ jobs: type=edge type=schedule type=ref,event=pr + type=ref,event=branch,suffix=-rc,enable=${{ startsWith(github.ref, 'refs/heads/release') && inputs.tag == '' }} + type=raw,value=${{ inputs.tag }},enable=${{ inputs.tag != '' }} - name: NGINX Docker meta id: nginx-meta @@ -56,6 +62,8 @@ jobs: type=edge type=schedule type=ref,event=pr + type=ref,event=branch,suffix=-rc,enable=${{ startsWith(github.ref, 'refs/heads/release') && inputs.tag == '' }} + type=raw,value=${{ inputs.tag }},enable=${{ inputs.tag != '' }} - name: Build NGF Docker Image uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 From 55ca2a3ed11675f06536eb673e3f4ba4aaae7327 Mon Sep 17 00:00:00 2001 From: Ciara Stacke Date: Wed, 22 Oct 2025 09:07:02 +0100 Subject: [PATCH 2/2] Remove v from tags --- .github/workflows/build.yml | 3 +-- .github/workflows/helm.yml | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9bd0f85295..aa6b93b367 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -125,12 +125,11 @@ jobs: flavor: | latest=${{ (inputs.tag != '' && 'true') || 'auto' }} tags: | - type=semver,pattern={{version}},suffix=${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }} + type=semver,pattern={{version}},value=${{ inputs.tag }},enable=${{ inputs.tag != '' }},suffix=${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }} type=edge,suffix=${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }} type=schedule,suffix=${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }} type=ref,event=pr,suffix=${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }} type=ref,event=branch,suffix=-rc${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }},enable=${{ startsWith(github.ref, 'refs/heads/release') && inputs.tag == '' }} - type=raw,value=${{ inputs.tag }},enable=${{ inputs.tag != '' }},suffix=${{ inputs.build-os != '' && format('-{0}', inputs.build-os) || '' }} labels: | org.opencontainers.image.documentation=https://docs.nginx.com/nginx-gateway-fabric org.opencontainers.image.vendor=NGINX Inc diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index cf6ad99843..857207d4f7 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -44,12 +44,11 @@ jobs: images: | name=ghcr.io/nginx/nginx-gateway-fabric tags: | - type=semver,pattern={{version}} + type=semver,pattern={{version}},value=${{ inputs.tag }},enable=${{ inputs.tag != '' }} type=edge type=schedule type=ref,event=pr type=ref,event=branch,suffix=-rc,enable=${{ startsWith(github.ref, 'refs/heads/release') && inputs.tag == '' }} - type=raw,value=${{ inputs.tag }},enable=${{ inputs.tag != '' }} - name: NGINX Docker meta id: nginx-meta @@ -58,12 +57,11 @@ jobs: images: | name=ghcr.io/nginx/nginx-gateway-fabric/${{ inputs.image == 'plus' && 'nginx-plus' || inputs.image }} tags: | - type=semver,pattern={{version}} + type=semver,pattern={{version}},value=${{ inputs.tag }},enable=${{ inputs.tag != '' }} type=edge type=schedule type=ref,event=pr type=ref,event=branch,suffix=-rc,enable=${{ startsWith(github.ref, 'refs/heads/release') && inputs.tag == '' }} - type=raw,value=${{ inputs.tag }},enable=${{ inputs.tag != '' }} - name: Build NGF Docker Image uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0