Skip to content

Commit

Permalink
ci: Publishes helm chart (#78)
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Gutierrez <[email protected]>
  • Loading branch information
AlfredoG87 authored Aug 5, 2024
1 parent 926b34c commit 6ddb2fb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 12 deletions.
39 changes: 28 additions & 11 deletions .github/workflows/release-push-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ jobs:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Get tag
run: |
if [[ "${{ github.event.inputs.version }}" ]]; then
echo "TAG=${{ github.event.inputs.version }}" >> $GITHUB_ENV
elif [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
echo "TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
else
echo "TAG=main" >> $GITHUB_ENV
fi
- name: Install JDK
uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
with:
Expand Down Expand Up @@ -104,8 +94,35 @@ jobs:
cache-to: type=gha,mode=max
platforms: linux/amd64, linux/arm64
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.TAG }}
tags: ${{ env.REGISTRY }}/${{ github.repository }}:${{ env.VERSION }}
build-args: |
VERSION=${{ env.VERSION }}
build-contexts: |
distributions=./server/build/distributions
helm-chart-release:
needs: publish
runs-on: [ self-hosted, Linux, medium, ephemeral ]
permissions:
contents: write

steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Install Helm
uses: azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0

- name: Publish helm chart
uses: stefanprodan/helm-gh-pages@0ad2bb377311d61ac04ad9eb6f252fb68e207260 # v1.7.0
with:
target_dir: charts
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
app_version: ${{ env.VERSION }}
2 changes: 1 addition & 1 deletion charts/hedera-block-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ image:
repository: ghcr.io/hashgraph/hedera-block-node
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "main"
tag: ""

imagePullSecrets: []
nameOverride: ""
Expand Down

0 comments on commit 6ddb2fb

Please sign in to comment.