Skip to content

Commit 25ad9e0

Browse files
committed
feat(helm): Create release actions
1 parent b2ad364 commit 25ad9e0

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: helm_release
2+
on:
3+
pull_request:
4+
branches:
5+
- 'v*'
6+
types:
7+
- closed
8+
jobs:
9+
helm:
10+
runs-on: ubuntu-latest
11+
if: github.event.pull_request.merged == true
12+
steps:
13+
- name: Extract Version Tag
14+
id: extract_version
15+
run: /bin/bash -c 'echo ::set-output name=VERSION::$(echo ${GITHUB_REF##*/} | cut -c2-)'
16+
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
20+
# Change version and appVersion in Chart.yaml to the tag in the closed PR
21+
- name: Update Helm App/Chart Version
22+
shell: bash
23+
run: |
24+
sed -i "s/^version: .*/version: ${{ steps.extract_version.outputs.VERSION }}/g" deploy/charts/ejbca-cert-manager-issuer/Chart.yaml
25+
sed -i "s/^appVersion: .*/appVersion: \"${{ steps.extract_version.outputs.VERSION }}\"/g" deploy/charts/ejbca-cert-manager-issuer/Chart.yaml
26+
27+
- name: Configure Git
28+
run: |
29+
git config user.name "$GITHUB_ACTOR"
30+
git config user.email "[email protected]"
31+
32+
- name: Install Helm
33+
uses: azure/setup-helm@v3
34+
35+
- name: Run chart-releaser
36+
uses: helm/[email protected]
37+
env:
38+
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
39+
with:
40+
pages_branch: gh-pages
41+
charts_dir: deploy/charts
42+
mark_as_latest: true
43+
packages_with_index: true

0 commit comments

Comments
 (0)