Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Publishes helm chart #78

Merged
merged 5 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading