diff --git a/.github/workflows/update-helm.yml b/.github/workflows/update-helm.yml new file mode 100644 index 00000000..bb551d8a --- /dev/null +++ b/.github/workflows/update-helm.yml @@ -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 "chocart.hugues@icloud.com" + git config --local user.name "hughcrt" + git add . + git commit -m "chore: update Helm chart to version ${{ steps.release_tag.outputs.tag }}" + git push diff --git a/.github/workflows/update-ml.yml b/.github/workflows/update-ml.yml index c2c78232..a4b8287d 100644 --- a/.github/workflows/update-ml.yml +++ b/.github/workflows/update-ml.yml @@ -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