Skip to content

Commit 2e3a186

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 59fa883 commit 2e3a186

File tree

3 files changed

+36
-4
lines changed

3 files changed

+36
-4
lines changed

.github/workflows/release.yaml

+21-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,22 @@ 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/cosign-installer@main
17+
with:
18+
cosign-release: "v2.4.1"
19+
20+
- name: Login to GitHub Container Registry
21+
uses: docker/[email protected]
22+
with:
23+
registry: ghcr.io
24+
username: ${{ github.actor }}
25+
password: ${{ secrets.GITHUB_TOKEN }}
26+
1227
- name: Checkout
1328
uses: actions/checkout@v4
1429
with:
@@ -19,7 +34,6 @@ jobs:
1934
git config user.name "$GITHUB_ACTOR"
2035
git config user.email "[email protected]"
2136
22-
2337
- name: Set up Helm
2438
uses: azure/setup-helm@v4
2539
with:
@@ -29,3 +43,9 @@ jobs:
2943
uses: helm/[email protected]
3044
env:
3145
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
46+
47+
- name: Publish chart to ghcr.io
48+
run: |
49+
helm package charts/coredns
50+
helm push coredns-*.tgz oci://ghcr.io/coredns/charts
51+
rm -rf coredns-*.tgz

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.1
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: changed
23-
description: Fixed typo in readme
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)