Skip to content

Commit 9d43ba9

Browse files
committed
feat: use separate helm chart release workflow
Signed-off-by: Carlos Salas <[email protected]>
1 parent bb3ef2d commit 9d43ba9

File tree

2 files changed

+250
-170
lines changed

2 files changed

+250
-170
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
tag:
5+
type: string
6+
description: Tag for the release
7+
required: true
8+
9+
org:
10+
type: string
11+
description: Organization part of the image name
12+
required: true
13+
14+
image:
15+
type: string
16+
description: Static image value for the build
17+
18+
release_dir:
19+
type: string
20+
description: Directory where release is stored
21+
default: .cr-release-packages
22+
23+
jobs:
24+
release:
25+
name: Create helm release
26+
runs-on: ubuntu-latest
27+
env:
28+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
29+
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v6
33+
with:
34+
fetch-depth: 0
35+
36+
- name: setupGo
37+
uses: actions/[email protected]
38+
with:
39+
go-version-file: go.mod
40+
41+
- name: Configure Git
42+
run: |
43+
git config user.name "$GITHUB_ACTOR"
44+
git config user.email "[email protected]"
45+
46+
- name: Package operator chart
47+
run: RELEASE_TAG=${GITHUB_REF##*/} CHART_PACKAGE_DIR=${{ inputs.release_dir }} CONTROLLER_IMG="${{ inputs.org }}/${{ inputs.image }}" ORG=${{ inputs.org }} make release
48+
49+
- name: Install chart-releaser
50+
uses: helm/[email protected]
51+
with:
52+
install_only: true
53+
54+
- name: Prepare environment for the chart releaser
55+
run: |
56+
echo "CR_OWNER=$(cut -d '/' -f 1 <<< $GITHUB_REPOSITORY)" >> $GITHUB_ENV
57+
echo "CR_GIT_REPO=$(cut -d '/' -f 2 <<< $GITHUB_REPOSITORY)" >> $GITHUB_ENV
58+
rm -rf .cr-index
59+
mkdir -p .cr-index
60+
61+
#- name: Run chart-releaser upload
62+
# run: cr upload --skip-existing -c "$(git rev-parse HEAD)" --generate-release-notes --release-name-template "${{ inputs.tag }}" --make-release-latest=false
63+
64+
#- name: Run chart-releaser index
65+
# run: cr index --push --release-name-template "${{ inputs.tag }}"

0 commit comments

Comments
 (0)