Skip to content

Commit

Permalink
feat: publish charts as OCI artifacts to GHCR
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Baker <rbtr@users.noreply.github.com>
  • Loading branch information
rbtr authored Mar 22, 2024
1 parent 00386eb commit 2d979c8
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 5 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release-charts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release Retina Charts

on:
push:
branches: [main]
tags: ["v*"]

permissions:
contents: read
packages: write

jobs:
push-retina-charts:
name: Publish Retina Helm Charts
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: azure/setup-helm@v4.1.0
with:
version: "<version>" # default is latest (stable)
id: install

- name: Log in to registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u $ --password-stdin

- name: Build/Push Chart
shell: bash
run: |
set -euo pipefail
export TAG=$(make version)
helm package ./deploy/manifests/controller/helm/retina --version $TAG
helm push retina-*.tgz oci://ghcr.io/${{ github.repository }}/charts
6 changes: 3 additions & 3 deletions deploy/manifests/controller/helm/retina/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: retina
description: A Helm chart for retina Kubernetes with dependencies
description: A Helm chart for microsoft/retina

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.0.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "0.1.0"
appVersion: "0.0.1"
4 changes: 2 additions & 2 deletions deploy/manifests/controller/helm/retina/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ os:
operator:
enabled: false
repository: ghcr.io/microsoft/retina/retina-operator
tag: "v0.0.1-pre.1"
tag: "v0.0.1"
installCRDs: true
enableRetinaEndpoint: false
capture:
Expand All @@ -22,7 +22,7 @@ image:
initRepository: ghcr.io/microsoft/retina/retina-init
pullPolicy: Always
# Overrides the image tag whose default is the chart appVersion.
tag: "v0.0.1-pre.1"
tag: "v0.0.1"

enablePodLevel: false
remoteContext: false
Expand Down

0 comments on commit 2d979c8

Please sign in to comment.