Repository navigation
feat: add database migration monitoring and best practices reporting #23
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: 🐳 Build and Publish Docker Image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - 'LICENSE' | |
| - '.gitignore' | |
| - 'examples/**' | |
| - 'reports/**' | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**.md' | |
| - 'docs/**' | |
| - 'LICENSE' | |
| - '.gitignore' | |
| - 'examples/**' | |
| - 'reports/**' | |
| workflow_dispatch: | |
| env: | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: tsviz/actions-pulse | |
| NODE_VERSION: '22' | |
| jobs: | |
| test: | |
| name: 🧪 Test & Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout | |
| uses: actions/checkout@v4 | |
| - name: 🔧 Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'npm' | |
| - name: 📦 Install dependencies | |
| run: npm ci | |
| - name: 🔍 Lint | |
| run: npm run lint || true | |
| - name: 🏗️ Build | |
| run: npm run build | |
| - name: 📋 Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build | |
| path: dist/ | |
| retention-days: 1 | |
| docker-build: | |
| name: 🐳 Build & Push Docker | |
| runs-on: ubuntu-latest | |
| needs: test | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: 📥 Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: 🔧 Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: 🔑 Install cosign | |
| if: github.event_name != 'pull_request' | |
| uses: sigstore/cosign-installer@v3 | |
| - name: 🔐 Log in to GitHub Container Registry | |
| if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: 🏷️ Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=semver,pattern=v{{version}} | |
| type=semver,pattern=v{{major}}.{{minor}} | |
| type=semver,pattern=v{{major}} | |
| type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/v') }} | |
| type=ref,event=pr | |
| type=sha,prefix=main-,enable=${{ github.ref == 'refs/heads/main' }} | |
| labels: | | |
| org.opencontainers.image.title=ActionsPulse | |
| org.opencontainers.image.description=GitHub Actions Cost Analytics MCP Server | |
| org.opencontainers.image.vendor=${{ github.repository_owner }} | |
| - name: 🐳 Build and push Docker image | |
| id: build-push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ github.event_name != 'pull_request' }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| build-args: | | |
| VERSION=${{ github.ref_name }} | |
| COMMIT_SHA=${{ github.sha }} | |
| - name: ✍️ Sign the container image | |
| if: github.event_name != 'pull_request' && steps.build-push.outputs.digest != '' | |
| env: | |
| DIGEST: ${{ steps.build-push.outputs.digest }} | |
| run: | | |
| cosign sign --yes ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${DIGEST} | |
| release: | |
| name: 🎉 Create GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: docker-build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: 📥 Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 📝 Generate changelog | |
| id: changelog | |
| run: | | |
| PREV_TAG=$(git tag --sort=-version:refname | sed -n '2p') | |
| if [ -z "$PREV_TAG" ]; then | |
| PREV_TAG=$(git rev-list --max-parents=0 HEAD) | |
| fi | |
| CHANGELOG=$(git log --pretty=format:"- %s (%h)" $PREV_TAG..HEAD 2>/dev/null || echo "- Initial release") | |
| echo "changelog<<EOF" >> "$GITHUB_OUTPUT" | |
| echo "$CHANGELOG" >> "$GITHUB_OUTPUT" | |
| echo "EOF" >> "$GITHUB_OUTPUT" | |
| - name: 🎉 Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: ActionsPulse ${{ github.ref_name }} | |
| body: | | |
| # 🚀 ActionsPulse ${{ github.ref_name }} | |
| Real-time GitHub Actions cost analytics and optimization MCP server. | |
| ## 🐳 Docker Images | |
| ```bash | |
| # Pull the latest release | |
| docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} | |
| # Or use latest | |
| docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest | |
| ``` | |
| **Multi-architecture support:** `linux/amd64` • `linux/arm64` | |
| ## ⚙️ Quick Start | |
| **VS Code / GitHub Copilot Configuration:** | |
| ```json | |
| { | |
| "mcpServers": { | |
| "actions-pulse": { | |
| "command": "docker", | |
| "args": [ | |
| "run", "-i", "--rm", | |
| "-e", "GITHUB_TOKEN", | |
| "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}" | |
| ] | |
| } | |
| } | |
| } | |
| ``` | |
| ## ✨ Features | |
| - 📊 **Cost Analytics** - Track spending across workflows and runners | |
| - 🏃 **Runner Detection** - Accurate pricing for standard and custom runners | |
| - 📈 **Interactive Dashboard** - HTML reports with Chart.js visualizations | |
| - 🏢 **Multi-Org Support** - Monitor multiple organizations | |
| - 🤖 **AI Advisor** - Cost optimization recommendations | |
| ## 📋 Changes | |
| ${{ steps.changelog.outputs.changelog }} | |
| draft: false | |
| prerelease: false | |
| publish-mcp-registry: | |
| name: 📦 Publish to MCP Registry | |
| runs-on: ubuntu-latest | |
| needs: docker-build | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| permissions: | |
| id-token: write # Required for OIDC authentication | |
| contents: read | |
| steps: | |
| - name: 📥 Checkout | |
| uses: actions/checkout@v4 | |
| - name: 🔧 Update server.json version | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| TAG=${GITHUB_REF#refs/tags/} | |
| jq --arg v "$VERSION" --arg tag "$TAG" '.version = $v | .packages[0].identifier = "ghcr.io/tsviz/actions-pulse:" + $tag' server.json > server.tmp && mv server.tmp server.json | |
| cat server.json | |
| - name: 📥 Install mcp-publisher | |
| run: | | |
| curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher | |
| - name: 🔐 Authenticate to MCP Registry | |
| run: ./mcp-publisher login github-oidc | |
| - name: 🚀 Publish to MCP Registry | |
| run: ./mcp-publisher publish |