-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Showing
3 changed files
with
41 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,20 @@ on: | |
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # needed to pull git repo and create "chart-release" | ||
id-token: write # needed for signing the images with GitHub OIDC Token | ||
steps: | ||
- name: Install Cosign | ||
uses: sigstore/[email protected] | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/[email protected] | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -19,13 +32,20 @@ jobs: | |
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Set up Helm | ||
uses: azure/setup-helm@v4 | ||
with: | ||
version: v3.13.1 | ||
|
||
- name: Run chart-releaser | ||
uses: helm/[email protected] | ||
env: | ||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Publish chart to ghcr.io | ||
run: | | ||
helm package charts/coredns | ||
helm push coredns-*.tgz oci://ghcr.io/coredns/charts | ||
rm -rf coredns-*.tgz | ||
- name: Sign artifacts with Cosign | ||
env: | ||
COSIGN_EXPERIMENTAL: 1 | ||
working-directory: charts/coredns | ||
run: |- | ||
cosign sign ghcr.io/coredns/charts/coredns:$(yq .version Chart.yaml) --yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters