diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5e732b094..aa6b93b367 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 @@ -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/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..857207d4f7 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 @@ -40,10 +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 == '' }} - name: NGINX Docker meta id: nginx-meta @@ -52,10 +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 == '' }} - name: Build NGF Docker Image uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0