Skip to content

Commit 0950cb4

Browse files
committed
new helm oci step
1 parent 0bc36d8 commit 0950cb4

File tree

7 files changed

+59
-54
lines changed

7 files changed

+59
-54
lines changed

.github/workflows/checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name: Checks
1010
"on":
1111
push:
1212
branches:
13-
- main
13+
- new-helm-oci
1414
pull_request:
1515
branches:
1616
- '*'

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name: CI
1010
"on":
1111
push:
1212
branches:
13-
- main
13+
- new-helm-oci
1414
paths-ignore:
1515
- '**.md'
1616
pull_request:

.github/workflows/codeql.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ name: CodeQL
1010
"on":
1111
push:
1212
branches:
13-
- main
13+
- new-helm-oci
1414
pull_request:
1515
branches:
16-
- main
16+
- new-helm-oci
1717
schedule:
1818
- cron: '00 07 * * 1'
1919
workflow_dispatch: {}

.github/workflows/container-registry-ghcr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ name: Container Registry GHCR
1010
"on":
1111
push:
1212
branches:
13-
- main
13+
- new-helm-oci
1414
workflow_dispatch: {}
1515
permissions:
1616
contents: read
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
################################################################################
2+
# This file is AUTOGENERATED with <https://github.com/sapcc/go-makefile-maker> #
3+
# Edit Makefile.maker.yaml instead. #
4+
################################################################################
5+
6+
# SPDX-FileCopyrightText: 2024 SAP SE or an SAP affiliate company
7+
# SPDX-License-Identifier: Apache-2.0
8+
9+
name: Helm OCI Package GHCR
10+
"on":
11+
push:
12+
branches:
13+
- new-helm-oci
14+
tags:
15+
- '*'
16+
workflow_dispatch: {}
17+
permissions:
18+
contents: read
19+
packages: write
20+
jobs:
21+
build-and-push-helm-package:
22+
name: Build and publish Helm Chart OCI
23+
runs-on: large_runner_16core_64gb
24+
steps:
25+
- name: Check out code
26+
uses: actions/checkout@v6
27+
- name: Install Helm
28+
uses: azure/setup-helm@v4.3.1
29+
- name: Lint Helm Chart
30+
run: helm lint charts/openstack-hypervisor-operator
31+
- name: Package Helm Chart
32+
run: |
33+
APP_VERSION=$(git describe --tags --exact-match ${{ github.sha }} 2>/dev/null || echo "")
34+
if [ -n "$APP_VERSION" ]; then VERSION=$(echo -n "$APP_VERSION" | sed -E 's/^v//'); fi
35+
if [ -z "$APP_VERSION" ]; then APP_VERSION=$(echo -n "sha-${{ github.sha }}"); fi
36+
HELM_ARGS=--dependency-update
37+
if [ -n "$APP_VERSION" ]; then
38+
HELM_ARGS="$HELM_ARGS --app-version $APP_VERSION"
39+
fi
40+
if [ -n "$VERSION" ]; then
41+
HELM_ARGS="$HELM_ARGS --version $VERSION"
42+
fi
43+
helm package charts/openstack-hypervisor-operator --destination ./chart $HELM_ARGS
44+
- name: Log in to the Container registry
45+
uses: docker/login-action@v4
46+
with:
47+
password: ${{ secrets.GITHUB_TOKEN }}
48+
registry: ghcr.io
49+
username: ${{ github.actor }}
50+
- name: Push Helm Chart to ghcr.io
51+
run: helm push ./chart/*.tgz oci://ghcr.io/${{ github.repository_owner }}/charts

.github/workflows/publish-helm.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

Makefile.maker.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ githubWorkflow:
3030
enabled: true
3131
runOn: [large_runner_16core_64gb]
3232
global:
33-
defaultBranch: main # only defined here so that the "Run go-makefile-maker" Action knows it
33+
defaultBranch: new-helm-oci # only defined here so that the "Run go-makefile-maker" Action knows it
3434
securityChecks:
3535
enabled: true
3636
queries: security-extended
@@ -42,6 +42,8 @@ githubWorkflow:
4242
- latest
4343
- semver
4444
- sha
45+
pushHelmChartToGhcr:
46+
path: charts/openstack-hypervisor-operator
4547
license:
4648
enabled: true
4749

0 commit comments

Comments
 (0)