Skip to content

Commit e16b911

Browse files
authored
Add OCI chart releaser workflow (#776)
1 parent e81009d commit e16b911

2 files changed

Lines changed: 67 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release Helm Charts
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'charts/gardener-extension-provider-ironcore/**'
9+
workflow_dispatch:
10+
11+
jobs:
12+
helm-chart:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Set up Helm
24+
uses: azure/setup-helm@v4
25+
with:
26+
version: v3.16.2
27+
28+
- name: Determine chart version
29+
id: chart_version
30+
run: |
31+
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == "refs/heads/main" ]]; then
32+
# Use SHA for main branch
33+
CHART_VERSION="0.0.0-$(echo ${{ github.sha }} | cut -c1-7)"
34+
elif [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
35+
# Use tag version (strip 'v' prefix)
36+
CHART_VERSION="${GITHUB_REF#refs/tags/v}"
37+
else
38+
# Use PR SHA for dry run
39+
CHART_VERSION="0.0.0-$(echo ${{ github.sha }} | cut -c1-7)"
40+
fi
41+
echo "version=$CHART_VERSION" >> $GITHUB_OUTPUT
42+
43+
- name: Log in to GitHub Container Registry
44+
run: |
45+
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin
46+
47+
- name: Package provider Helm chart
48+
run: |
49+
helm package charts/gardener-extension-provider-ironcore --version ${{ steps.chart_version.outputs.version }}
50+
51+
- name: Push provider Helm chart to GHCR
52+
run: |
53+
helm push gardener-extension-provider-ironcore-${{ steps.chart_version.outputs.version }}.tgz oci://ghcr.io/${{ github.repository_owner }}/charts
54+
55+
- name: Package admission Helm chart
56+
run: |
57+
helm package charts/gardener-extension-admission-ironcore --version ${{ steps.chart_version.outputs.version }}
58+
59+
- name: Push admission Helm chart to GHCR
60+
run: |
61+
helm push gardener-extension-admission-ironcore-${{ steps.chart_version.outputs.version }}.tgz oci://ghcr.io/${{ github.repository_owner }}/charts

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,9 @@ Please find further resources about out project here:
5454
* [Extensibility API documentation](https://github.com/gardener/gardener/tree/master/docs/extensions)
5555
* [Gardener Extensions Golang library](https://godoc.org/github.com/gardener/gardener/extensions/pkg)
5656
* [Gardener API Reference](https://gardener.cloud/api-reference/)
57+
58+
## Licensing
59+
60+
Copyright 2025 SAP SE or an SAP affiliate company and IronCore contributors. Please see our [LICENSE](LICENSE) for
61+
copyright and license information. Detailed information including third-party components and their licensing/copyright
62+
information is available [via the REUSE tool](https://api.reuse.software/info/github.com/ironcore-dev/gardener-extension-provider-ironcore).

0 commit comments

Comments
 (0)