Skip to content

Commit 48a3d40

Browse files
committed
Integrate release-chart workflow into release workflow
1 parent 726a54a commit 48a3d40

2 files changed

Lines changed: 52 additions & 70 deletions

File tree

.github/workflows/release-chart.yaml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,65 @@ jobs:
9393
labels: ${{ steps.meta.outputs.labels }}
9494
target: ${{ matrix.image }}
9595

96+
helm:
97+
name: Release Helm Charts
98+
runs-on: ubuntu-latest
99+
if: |
100+
github.event_name == 'push' ||
101+
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ok-to-charts'))
102+
103+
permissions:
104+
contents: read
105+
packages: write
106+
107+
steps:
108+
- uses: actions/checkout@v5
109+
110+
- uses: azure/setup-helm@v4
111+
with:
112+
version: v3.16.2
113+
114+
- name: Determine chart version
115+
id: chart_version
116+
run: |
117+
# Use SHA for main branch and PRs
118+
CHART_VERSION="v0.0.0+$(echo ${{ github.sha }} | cut -c1-7)"
119+
120+
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
121+
# Use tag version
122+
CHART_VERSION="${GITHUB_REF_NAME}"
123+
fi
124+
echo "version=$CHART_VERSION" >> $GITHUB_OUTPUT
125+
126+
- name: Log in to GitHub Container Registry
127+
run: |
128+
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin
129+
130+
- name: Package Helm charts
131+
run: |
132+
helm package charts/gardener-extension-provider-ironcore --version ${CHART_VERSION}
133+
helm package charts/gardener-extension-admission-ironcore/charts/application --version ${CHART_VERSION}
134+
helm package charts/gardener-extension-admission-ironcore/charts/runtime --version ${CHART_VERSION}
135+
env:
136+
CHART_VERSION: ${{ steps.chart_version.outputs.version }}
137+
138+
- name: Push Helm charts to GHCR
139+
run: |
140+
helm push gardener-extension-provider-ironcore-${CHART_VERSION}.tgz oci://ghcr.io/${REPO_OWNER}/charts
141+
helm push gardener-extension-admission-ironcore-runtime-${CHART_VERSION}.tgz oci://ghcr.io/${REPO_OWNER}/charts
142+
helm push gardener-extension-admission-ironcore-application-${CHART_VERSION}.tgz oci://ghcr.io/${REPO_OWNER}/charts
143+
env:
144+
CHART_VERSION: ${{ steps.chart_version.outputs.version }}
145+
REPO_OWNER: ${{ github.repository_owner }}
146+
96147
ocm:
97148
name: Release OCM Component
98149
runs-on: ubuntu-latest
99150
if: github.event_name != 'pull_request'
100151

101152
needs:
102153
- docker
154+
- helm
103155

104156
permissions:
105157
contents: read

0 commit comments

Comments
 (0)