Comment out metrics and tracing services in docker-compose #15
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Semantic Release | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| packages: write | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: web/package-lock.json | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23" | |
| - name: Install frontend dependencies | |
| run: cd web && npm ci | |
| - name: Build frontend | |
| run: cd web && npm run build | |
| - name: Run Go tests | |
| run: make test | |
| - name: Run Go linting | |
| run: make lint | |
| release: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| - name: Install semantic-release dependencies | |
| run: npm ci | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.23" | |
| - name: Install frontend dependencies | |
| run: cd web && npm ci | |
| - name: Install docs dependencies | |
| run: cd docs && npm ci | |
| - name: Build frontend | |
| run: cd web && npm run build | |
| - name: Copy frontend build for Go embed | |
| run: | | |
| mkdir -p internal/ui/dist | |
| cp -r web/dist/* internal/ui/dist/ | |
| - name: Build docs | |
| run: cd docs && npm run build | |
| - name: Generate Swagger docs | |
| run: | | |
| go install github.com/swaggo/swag/cmd/swag@latest | |
| swag init -g cmd/server/main.go -o internal/handlers/swagger | |
| - name: Run semantic-release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
| DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} | |
| run: npx semantic-release | |
| build-and-push: | |
| needs: release | |
| runs-on: ubuntu-latest | |
| if: needs.release.outputs.new_release_published == 'true' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Get version | |
| run: | | |
| if [ -f VERSION ]; then | |
| echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV | |
| else | |
| echo "VERSION=latest" >> $GITHUB_ENV | |
| fi | |
| - name: Build and push versioned image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| amerfu/pllm:${{ env.VERSION }} | |
| amerfu/pllm:latest | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| package-helm: | |
| needs: release | |
| runs-on: ubuntu-latest | |
| if: needs.release.outputs.new_release_published == 'true' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install Helm | |
| uses: azure/setup-helm@v4 | |
| with: | |
| version: '3.12.0' | |
| - name: Get version | |
| run: | | |
| if [ -f VERSION ]; then | |
| echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV | |
| else | |
| echo "VERSION=latest" >> $GITHUB_ENV | |
| fi | |
| - name: Update Helm dependencies | |
| run: | | |
| cd deploy/helm/pllm | |
| helm dependency update | |
| - name: Package Helm chart | |
| run: | | |
| cd deploy/helm | |
| helm package pllm --version ${{ env.VERSION }} --app-version ${{ env.VERSION }} | |
| - name: Upload Helm chart to GitHub Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload v${{ env.VERSION }} deploy/helm/pllm-${{ env.VERSION }}.tgz | |
| - name: Configure Git for Pages | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Setup Helm repository (GitHub Pages) | |
| run: | | |
| # Clone or create gh-pages branch | |
| git fetch origin gh-pages:gh-pages 2>/dev/null || git checkout --orphan gh-pages | |
| git checkout gh-pages | |
| # Copy packaged chart | |
| cp deploy/helm/pllm-${{ env.VERSION }}.tgz . | |
| # Generate or update index | |
| helm repo index . --url https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/ | |
| # Commit and push | |
| git add . | |
| git commit -m "Add Helm chart version ${{ env.VERSION }}" | |
| git push origin gh-pages |