Skip to content

Commit e5393fb

Browse files
authored
Merge pull request #55 from olamilekan000/update-pipelinme
update chart flow
2 parents f6b1325 + 8b9142c commit e5393fb

1 file changed

Lines changed: 34 additions & 17 deletions

File tree

.github/workflows/release.yml

Lines changed: 34 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
required: true
99
push:
1010
tags:
11+
# Release binary for every tag.
1112
- v*
1213

1314
permissions:
@@ -31,23 +32,39 @@ jobs:
3132
uses: azure/setup-helm@1a275c3b69536ee54be43f2070a358922e12c8d4
3233
with:
3334
version: 'v3.19.0'
34-
35+
3536
- name: Add Bitnami Charts Repo
36-
run: helm repo add bitnami https://charts.bitnami.com/bitnami
37-
38-
- name: Build chart dependencies
39-
run: helm dependency build .
40-
41-
- name: Package Helm chart
42-
run: |
43-
mkdir -p .cr-release-packages
44-
cr package .
45-
46-
- name: Release charts
47-
uses: helm/chart-releaser-action@v1.7.0
48-
with:
49-
charts_dir: .cr-release-packages
50-
skip_packaging: true
37+
run: helm repo add bitnami https://charts.bitnami.com/bitnami
38+
39+
- name: Package and upload helm chart
5140
env:
5241
CR_TOKEN: ${{ secrets.TEMP_PAT }}
53-
CR_OWNER: convoy
42+
CR_VERSION: "1.8.1"
43+
run: |
44+
curl -sSLo cr.tar.gz "https://github.com/helm/chart-releaser/releases/download/v${CR_VERSION}/chart-releaser_${CR_VERSION}_linux_amd64.tar.gz"
45+
tar -xzf cr.tar.gz
46+
rm -f cr.tar.gz
47+
owner=$(cut -d '/' -f 1 <<< "$GITHUB_REPOSITORY")
48+
repo=$(cut -d '/' -f 2 <<< "$GITHUB_REPOSITORY")
49+
50+
# package chart
51+
./cr package .
52+
53+
# upload chart to github releases
54+
./cr upload \
55+
--owner "$owner" \
56+
--git-repo "$repo" \
57+
--token "$CR_TOKEN" \
58+
--release-name-template "convoy-{{ .Version }}"
59+
60+
# update index and push to github pages
61+
git config user.email "$owner@users.noreply.github.com"
62+
git config user.name "$owner"
63+
./cr index \
64+
--owner "$owner" \
65+
--git-repo "$repo" \
66+
--token "$CR_TOKEN" \
67+
--release-name-template "convoy-{{ .Version }}" \
68+
--index-path ./index.yaml \
69+
--charts-repo https://$owner.github.io/$repo \
70+
--push

0 commit comments

Comments
 (0)