Skip to content

Commit 6ddb2fb

Browse files
authored
ci: Publishes helm chart (#78)
Signed-off-by: Alfredo Gutierrez <alfredo@swirldslabs.com>
1 parent 926b34c commit 6ddb2fb

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed

.github/workflows/release-push-image.yaml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,6 @@ jobs:
5555
- name: Checkout repository
5656
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5757

58-
- name: Get tag
59-
run: |
60-
if [[ "${{ github.event.inputs.version }}" ]]; then
61-
echo "TAG=${{ github.event.inputs.version }}" >> $GITHUB_ENV
62-
elif [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
63-
echo "TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
64-
else
65-
echo "TAG=main" >> $GITHUB_ENV
66-
fi
67-
6858
- name: Install JDK
6959
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
7060
with:
@@ -104,8 +94,35 @@ jobs:
10494
cache-to: type=gha,mode=max
10595
platforms: linux/amd64, linux/arm64
10696
push: true
107-
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.TAG }}
97+
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.VERSION }}
10898
build-args: |
10999
VERSION=${{ env.VERSION }}
110100
build-contexts: |
111101
distributions=./server/build/distributions
102+
103+
104+
helm-chart-release:
105+
needs: publish
106+
runs-on: [ self-hosted, Linux, medium, ephemeral ]
107+
permissions:
108+
contents: write
109+
110+
steps:
111+
- name: Harden Runner
112+
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
113+
with:
114+
egress-policy: audit
115+
116+
- name: Checkout repository
117+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
118+
119+
- name: Install Helm
120+
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
121+
122+
- name: Publish helm chart
123+
uses: stefanprodan/helm-gh-pages@0ad2bb377311d61ac04ad9eb6f252fb68e207260 # v1.7.0
124+
with:
125+
target_dir: charts
126+
token: ${{ secrets.GITHUB_TOKEN }}
127+
branch: gh-pages
128+
app_version: ${{ env.VERSION }}

charts/hedera-block-node/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ image:
66
repository: ghcr.io/hashgraph/hedera-block-node
77
pullPolicy: IfNotPresent
88
# Overrides the image tag whose default is the chart appVersion.
9-
tag: "main"
9+
tag: ""
1010

1111
imagePullSecrets: []
1212
nameOverride: ""

0 commit comments

Comments
 (0)