Skip to content

Commit

Permalink
ci: fix ml and add helm auto publish (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt authored Aug 4, 2024
1 parent a0301d8 commit e815f8b
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/update-helm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Update and Publish Helm Chart

on:
release:
types: [published]

jobs:
update-and-publish:
runs-on: ubuntu-latest
steps:
- name: Check out the helm repo
uses: actions/checkout@v4
with:
repository: lunary-ai/helm
token: ${{ secrets.GH_TOKEN }}

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: "latest"

- name: Login to Helm registry
run: |
helm registry login registry-1.docker.io -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}
- name: Remove 'v' prefix from release tag
id: release_tag
run: echo "tag=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//')" >> $GITHUB_OUTPUT

- name: Update Helm chart
run: |
bash update ${{ steps.release_tag.outputs.tag }}
- name: Publish Helm chart
run: |
bash publish
- name: Commit and push changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "hughcrt"
git add .
git commit -m "chore: update Helm chart to version ${{ steps.release_tag.outputs.tag }}"
git push
2 changes: 1 addition & 1 deletion .github/workflows/update-ml.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
- name: Check out the private ml repo
uses: actions/checkout@v4
with:
repository: lunary-ai/ml
token: ${{ secrets.GH_TOKEN }}
repository: lunary/ml

- name: Log in to Docker Hub
uses: docker/login-action@v3
Expand Down

0 comments on commit e815f8b

Please sign in to comment.