Skip to content

Commit 39bf194

Browse files
authored
Republish helm chart workflow (#5370)
1 parent b047d51 commit 39bf194

File tree

2 files changed

+98
-1
lines changed

2 files changed

+98
-1
lines changed

.github/workflows/publish-helm.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Publish Helm Chart
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
description: "Release Helm chart from branch"
8+
required: true
9+
10+
defaults:
11+
run:
12+
shell: bash
13+
14+
concurrency:
15+
group: ${{ github.ref_name }}-publish-helm
16+
cancel-in-progress: true
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
checks:
23+
name: Checks and variables
24+
runs-on: ubuntu-22.04
25+
outputs:
26+
chart_version: ${{ steps.vars.outputs.chart_version }}
27+
ic_version: ${{ steps.vars.outputs.ic_version }}
28+
steps:
29+
- name: Checkout Repository
30+
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
31+
with:
32+
ref: refs/heads/${{ inputs.branch }}
33+
34+
- name: Output Variables
35+
id: vars
36+
run: |
37+
source .github/data/version.txt
38+
echo "ic_version=${IC_VERSION}" >> $GITHUB_OUTPUT
39+
echo "chart_version=${HELM_CHART_VERSION}" >> $GITHUB_OUTPUT
40+
cat $GITHUB_OUTPUT
41+
42+
publish-helm:
43+
name: Package and Publish Helm Chart
44+
runs-on: ubuntu-22.04
45+
needs: [checks]
46+
permissions:
47+
contents: write # for pushing to Helm Charts repository
48+
packages: write # for helm to push to GHCR
49+
steps:
50+
- name: Checkout Repository
51+
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
52+
with:
53+
ref: refs/heads/${{ inputs.branch }}
54+
path: kic
55+
56+
- name: Login to GitHub Container Registry
57+
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
58+
with:
59+
registry: ghcr.io
60+
username: ${{ github.repository_owner }}
61+
password: ${{ secrets.GITHUB_TOKEN }}
62+
63+
- name: DockerHub Login
64+
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3.1.0
65+
with:
66+
username: ${{ secrets.DOCKER_USERNAME }}
67+
password: ${{ secrets.DOCKER_PASSWORD }}
68+
69+
- name: Package
70+
id: package
71+
run: |
72+
helm_versions="--app-version ${{ needs.checks.outputs.ic_version }} --version ${{ needs.checks.outputs.chart_version }}"
73+
output=$(helm package ${helm_versions} kic/charts/nginx-ingress)
74+
echo "path=$(basename -- $(echo $output | cut -d: -f2))" >> $GITHUB_OUTPUT
75+
76+
- name: Push to OCI registries
77+
run: |
78+
helm push ${{ steps.package.outputs.path }} oci://ghcr.io/nginxinc/charts
79+
helm push ${{ steps.package.outputs.path }} oci://registry-1.docker.io/nginxcharts
80+
81+
- name: Checkout Repository
82+
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
83+
with:
84+
repository: nginxinc/helm-charts
85+
fetch-depth: 1
86+
token: ${{ secrets.NGINX_PAT }}
87+
path: helm-charts
88+
89+
- name: Push Helm Chart to Helm Charts Repository
90+
run: |
91+
mv ${{ steps.package.outputs.path }} ${{ github.workspace }}/helm-charts/stable/
92+
cd ${{ github.workspace }}/helm-charts
93+
helm repo index stable --url https://helm.nginx.com/stable
94+
git add -A
95+
git -c user.name='NGINX Kubernetes Team' -c user.email='[email protected]' \
96+
commit -m "NGINX Ingress Controller - Release ${{ needs.checks.outputs.chart_version }}"
97+
git push -u origin master

docs/content/technical-specifications.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ We explicitly test NGINX Ingress Controller on a range of Kubernetes platforms f
2424
{{< bootstrap-table "table table-bordered table-striped table-responsive" >}}
2525
| NIC Version | Supported Kubernetes Version | NIC Helm Chart Version | NIC Operator Version | NGINX / NGINX Plus version |
2626
| --- | --- | --- | --- | --- |
27-
| 3.5.0 | 1.29 - 1.23 | 1.2.0 | 2.1.2 | 1.25.4 / R31 P1 |
27+
| 3.5.0 | 1.29 - 1.23 | 1.2.0 | 2.2.0 | 1.25.4 / R31 P1 |
2828
| 3.4.3 | 1.29 - 1.23 | 1.1.3 | 2.1.2 | 1.25.4 / R31 P1 |
2929
| 3.3.2 | 1.28 - 1.22 | 1.0.2 | 2.0.2 | 1.25.3 / R30 |
3030
| 3.2.1 | 1.27 - 1.22 | 0.18.1 | 1.5.1 | 1.25.2 / R30 |

0 commit comments

Comments
 (0)