Bump version to 0.1.7 #28
Workflow file for this run
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: "MCP Server: Build and Deploy" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "v[0-9]+.[0-9]+.[0-9]+" | |
| workflow_dispatch: | |
| inputs: | |
| deploy_action: | |
| description: "Deploy action" | |
| required: false | |
| default: "build only" | |
| type: choice | |
| options: | |
| - "build only" | |
| - "build + deploy" | |
| jobs: | |
| mcpb: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Build .mcpb | |
| run: npx @anthropic-ai/mcpb pack | |
| - name: Upload .mcpb artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ipinfo-mcp-server.mcpb | |
| path: "*.mcpb" | |
| - name: Create GitHub Release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: gh release create "${{ github.ref_name }}" *.mcpb --generate-notes | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| outputs: | |
| tag: ${{ steps.get_tag.outputs.tag }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Docker buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Determine image tag | |
| id: get_tag | |
| run: | | |
| if [[ "$GITHUB_REF" == refs/tags/v* ]]; then | |
| echo "tag=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| else | |
| echo "tag=$(git rev-parse --short=7 HEAD)" >> $GITHUB_OUTPUT | |
| fi | |
| - id: auth | |
| name: Authenticate to Google Cloud | |
| uses: google-github-actions/auth@v3 | |
| with: | |
| token_format: "access_token" | |
| workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} | |
| service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} | |
| access_token_lifetime: 2400s | |
| - name: Login to Artifact Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: us-central1-docker.pkg.dev | |
| username: oauth2accesstoken | |
| password: ${{ steps.auth.outputs.access_token }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v4 | |
| with: | |
| file: Dockerfile | |
| push: true | |
| tags: | | |
| ${{ secrets.GCP_REGISTRY }}/mcp:${{ steps.get_tag.outputs.tag }} | |
| ${{ secrets.GCP_REGISTRY }}/mcp:latest | |
| deploy: | |
| uses: ipinfo/infra/.github/workflows/deploy-web-component.yaml@main | |
| needs: build | |
| if: >- | |
| startsWith(github.ref, 'refs/tags/v') || | |
| (github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_action == 'build + deploy') | |
| concurrency: | |
| group: "ipinfo/infra-deploy-mcp-server-production" | |
| cancel-in-progress: false | |
| with: | |
| tag: ${{ needs.build.outputs.tag }} | |
| environment: "production" | |
| url: "https://mcp.ipinfo.io" | |
| helm_values_path: "kubernetes/kustomizations/apps/web/mcp-server/prod-v2/kustomization.yaml" | |
| property_path: "images[0].newTag" | |
| branch: "main" | |
| deployment_mode: "direct" | |
| verify_url: "https://mcp.ipinfo.io/.healthz/is-ready" | |
| secrets: | |
| deploy-key: "${{ secrets.INFRA_REPO_DEPLOY_KEY }}" |