Skip to content

Commit 61be1c4

Browse files
committed
feat(oci): add publishing of helm chart to oci repo
- fixes #182 - adds cosign keyless signing to actions Signed-off-by: Allen Conlon <[email protected]>
1 parent 7114b8c commit 61be1c4

File tree

3 files changed

+41
-9
lines changed

3 files changed

+41
-9
lines changed

.github/workflows/release.yaml

+26-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,20 @@ on:
88
jobs:
99
release:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write # needed to pull git repo and create "chart-release"
13+
id-token: write # needed for signing the images with GitHub OIDC Token
1114
steps:
15+
- name: Install Cosign
16+
uses: sigstore/[email protected]
17+
18+
- name: Login to GitHub Container Registry
19+
uses: docker/[email protected]
20+
with:
21+
registry: ghcr.io
22+
username: ${{ github.actor }}
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
1225
- name: Checkout
1326
uses: actions/checkout@v4
1427
with:
@@ -19,13 +32,20 @@ jobs:
1932
git config user.name "$GITHUB_ACTOR"
2033
git config user.email "[email protected]"
2134
22-
23-
- name: Set up Helm
24-
uses: azure/setup-helm@v4
25-
with:
26-
version: v3.13.1
27-
2835
- name: Run chart-releaser
2936
uses: helm/[email protected]
3037
env:
3138
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
39+
40+
- name: Publish chart to ghcr.io
41+
run: |
42+
helm package charts/coredns
43+
helm push coredns-*.tgz oci://ghcr.io/coredns/charts
44+
rm -rf coredns-*.tgz
45+
46+
- name: Sign artifacts with Cosign
47+
env:
48+
COSIGN_EXPERIMENTAL: 1
49+
working-directory: charts/coredns
50+
run: |-
51+
cosign sign ghcr.io/coredns/charts/coredns:$(yq .version Chart.yaml) --yes

charts/coredns/Chart.yaml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: coredns
3-
version: 1.37.3
3+
version: 1.38.0
44
appVersion: 1.11.4
55
home: https://coredns.io
66
icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png
@@ -19,5 +19,7 @@ maintainers:
1919
type: application
2020
annotations:
2121
artifacthub.io/changes: |
22-
- kind: fixed
23-
description: Fix helm install when using docker inmutable tags
22+
- kind: added
23+
description: Adds publishing to github registry
24+
- kind: added
25+
description: Adds signing of helm chart

charts/coredns/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ The command deploys CoreDNS on the Kubernetes cluster in the default configurati
3434

3535
> **Tip**: List all releases using `helm list --all-namespaces`
3636
37+
## OCI installing
38+
39+
The chart can also be installed using the following:
40+
41+
```console
42+
$ helm --namespace=kube-system install coredns oci://ghcr.io/coredns/charts/coredns --version 1.38.0
43+
```
44+
45+
The command deploys the `1.38.0` version of CoreDNS on the Kubernetes cluster in the default configuration.
46+
3747
## Uninstalling the Chart
3848

3949
To uninstall/delete the `coredns` deployment:

0 commit comments

Comments
 (0)