Skip to content

Commit

Permalink
Publish helm chart to S3 bucket (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmcgary authored Nov 14, 2024
2 parents f7e3eaf + 93f88c5 commit e23cc8b
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,19 @@ jobs:
--data-binary @"$asset" \
"${upload_url}?name=$asset_name"
done
release-helm-chart:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
needs: [build-binary]
permissions: write-all
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Release Helm Chart
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
run: |
./scripts/releaseHelmChart.sh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ test-db
node_modules
/release
.release_version
chart_releases
2 changes: 1 addition & 1 deletion charts/sidecar/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ description: A Helm chart for the EigenLayer sidecar

type: application

version: 0.1.0-beta.1
version: 0.1.0-beta.2

appVersion: "v1.0.0-beta.1"
14 changes: 14 additions & 0 deletions index.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
entries:
sidecar:
- apiVersion: v2
appVersion: v1.0.0-beta.1
created: "2024-11-13T21:23:12.29288-06:00"
description: A Helm chart for the EigenLayer sidecar
digest: bb14bb5ec625c6b4596a042aa9b4a1661bb58f1e9710e1cd17250e71ae3e31ec
name: sidecar
type: application
urls:
- https://eigenlayer-sidecar.s3.amazonaws.com/helm/sidecar-0.1.0-beta.1.tgz
version: 0.1.0-beta.1
generated: "2024-11-13T21:23:12.292376-06:00"
21 changes: 21 additions & 0 deletions scripts/releaseChart.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

bucket_name="eigenlayer-sidecar"
helm_repo_url="https://eigenlayer-sidecar.s3.amazonaws.com/helm"

mkdir chart_releases || true

helm package ./charts/* --destination chart_releases

if aws s3 ls "s3://${bucket_name}/helm/index.yaml" &>/dev/null; then
echo "Downloading existing index.yaml"
aws s3 cp "s3://${bucket_name}/helm/index.yaml" ./chart_releases/

echo "Generating index"
helm repo index --merge ./chart_releases/index.yaml --url $helm_repo_url ./chart_releases
else
echo "Generating index for the first time"
helm repo index --url $helm_repo_url ./chart_releases
fi

aws s3 sync ./chart_releases/ "s3://${bucket_name}/helm"

0 comments on commit e23cc8b

Please sign in to comment.