Skip to content

Commit

Permalink
ci: add helm publishing in pipeline (#618)
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt authored Oct 18, 2024
1 parent 33e1fe4 commit 0aceed9
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/build-push-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: "lab:latest"
driver: cloud
endpoint: "lunary/lunary"

- name: Remove 'v' prefix from release tag
id: release_tag
run: echo "tag=$(echo ${{ github.event.release.tag_name }} | sed 's/^v//')" >> $GITHUB_OUTPUT
Expand All @@ -94,6 +101,33 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max

publish-helm:
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: Check out the Helm repository
uses: actions/checkout@v4
with:
repository: lunary-ai/helm
token: ${{ secrets.GH_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: Set up Helm
run: |
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- name: Login to Helm repository
run: helm registry login registry-1.docker.io -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}

- name: Update Helm chart version
run: bash update.sh ${{ github.event.release.tag_name }}

- name: Publish Helm chart
run: bash publish.sh

deploy:
needs: build-push
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
run-tests:
if: ${{ !contains(github.head_ref, 'ci') && !contains(github.ref, 'ci') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -36,7 +37,6 @@ jobs:
run: npm ci

- name: Install Playwright
# if: steps.playwright-cache.outputs.cache-hit != 'true'
run: npx playwright install --with-deps chromium

- name: Start backend
Expand Down
Empty file removed test.ts
Empty file.

0 comments on commit 0aceed9

Please sign in to comment.