Skip to content

Commit aacd9b5

Browse files
authored
Merge pull request #205 from aclerici38/oci-chart
feat(ci): push chart to ghcr and sign
2 parents 0c62a2a + e157ad0 commit aacd9b5

3 files changed

Lines changed: 28 additions & 2 deletions

File tree

.github/workflows/cd-helm-release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ jobs:
1414
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
1515
permissions:
1616
contents: write
17+
packages: write
18+
id-token: write
1719
runs-on: ubuntu-22.04
1820
steps:
1921
- name: Checkout
@@ -33,7 +35,31 @@ jobs:
3335
version: v3.14.3
3436

3537
- name: Run chart-releaser for generic-device-plugin
38+
id: cr
3639
uses: helm/chart-releaser-action@v1.6.0
3740
env:
3841
CR_GENERATE_RELEASE_NOTES: true
3942
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
43+
44+
- name: Login to GHCR
45+
if: steps.cr.outputs.changed_charts != ''
46+
uses: docker/login-action@v4
47+
with:
48+
registry: ghcr.io
49+
username: ${{ github.repository_owner }}
50+
password: ${{ secrets.GITHUB_TOKEN }}
51+
52+
- name: Push chart to OCI registry
53+
if: steps.cr.outputs.changed_charts != ''
54+
run: helm push .cr-release-packages/*.tgz oci://ghcr.io/${{ github.repository_owner }}/charts
55+
56+
- name: Install Cosign
57+
if: steps.cr.outputs.changed_charts != ''
58+
uses: sigstore/cosign-installer@v4.1.2
59+
60+
- name: Sign chart
61+
if: steps.cr.outputs.changed_charts != ''
62+
run: |
63+
ref=ghcr.io/${{ github.repository_owner }}/charts/generic-device-plugin
64+
digest=$(docker buildx imagetools inspect "${ref}:${{ steps.cr.outputs.chart_version }}" --format '{{.Manifest.Digest}}')
65+
cosign sign --yes "${ref}@${digest}"

charts/generic-device-plugin/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type: application
1313
# This is the chart version. This version number should be incremented each time you make changes
1414
# to the chart and its templates, including the app version.
1515
# Versions are expected to follow Semantic Versioning (https://semver.org/)
16-
version: 0.1.0
16+
version: 0.1.1
1717
# This is the version number of the application being deployed. This version number should be
1818
# incremented each time you make changes to the application. Versions are not expected to
1919
# follow Semantic Versioning. They should reflect the version the application is using.

charts/generic-device-plugin/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generic-device-plugin
22

3-
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.0](https://img.shields.io/badge/AppVersion-0.2.0-informational?style=flat-square)
3+
![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.0](https://img.shields.io/badge/AppVersion-0.2.0-informational?style=flat-square)
44

55
A Helm chart for deploying the generic-device-plugin on Kubernetes
66

0 commit comments

Comments
 (0)