deps(mcp): update dependency flagsmith-common to v3.13.0 #87
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 Build, Publish and Deploy | |
| on: | |
| pull_request: | |
| paths: | |
| - mcp/** | |
| - .github/workflows/mcp-docker-build-publish-deploy.yml | |
| - .github/workflows/.reusable-docker-build.yml | |
| - .github/workflows/.reusable-docker-publish.yml | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - mcp/** | |
| - .github/workflows/mcp-docker-build-publish-deploy.yml | |
| - .github/workflows/.reusable-docker-build.yml | |
| - .github/workflows/.reusable-docker-publish.yml | |
| release: | |
| types: | |
| - released | |
| workflow_dispatch: | |
| jobs: | |
| docker-build-mcp: | |
| name: Build MCP Image | |
| uses: ./.github/workflows/.reusable-docker-build.yml | |
| with: | |
| file: mcp/Dockerfile | |
| image-name: flagsmith-mcp | |
| # On pull requests, validate the build without pushing to the registry. | |
| ephemeral: ${{ github.event_name == 'pull_request' }} | |
| # Publish to Docker Hub | |
| docker-publish-mcp: | |
| needs: [docker-build-mcp] | |
| uses: ./.github/workflows/.reusable-docker-publish.yml | |
| if: github.event_name == 'release' | |
| with: | |
| source-images: ${{ needs.docker-build-mcp.outputs.image }} | |
| target-images: flagsmith/flagsmith-mcp | |
| secrets: inherit | |
| # Publish to Quay.io | |
| docker-publish-quay-mcp: | |
| needs: [docker-build-mcp] | |
| uses: ./.github/workflows/.reusable-docker-publish.yml | |
| if: github.event_name == 'release' | |
| with: | |
| target-registry-url: quay.io | |
| docker-username: ${{ vars.QUAY_PUBLISH_USERNAME }} | |
| docker-password-secret-name: QUAY_PUBLISH_PASSWORD | |
| source-images: ${{ needs.docker-build-mcp.outputs.image }} | |
| target-images: quay.io/${{ vars.QUAY_ORGANISATION_NAME }}/flagsmith-mcp | |
| secrets: inherit | |
| # Publish to staging Amazon ECR on every push to main | |
| docker-publish-ecr-staging-mcp: | |
| name: Publish MCP image to staging ECR | |
| needs: [docker-build-mcp] | |
| if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
| runs-on: depot-ubuntu-latest | |
| # The OIDC role trusts jobs running in the staging environment. | |
| environment: staging | |
| outputs: | |
| image: ${{ vars.MCP_ECR_REPOSITORY_URL }}:${{ steps.meta.outputs.version }} | |
| permissions: | |
| contents: read | |
| packages: read | |
| id-token: write | |
| steps: | |
| - name: Cloning repo | |
| uses: actions/checkout@v5 | |
| with: | |
| sparse-checkout: depot.json | |
| sparse-checkout-cone-mode: false | |
| - name: Login to Github Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ vars.MCP_ECR_GITHUB_ROLE_ARN }} | |
| aws-region: eu-west-2 | |
| - name: Login to Amazon ECR | |
| uses: aws-actions/amazon-ecr-login@v1 | |
| - name: Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ vars.MCP_ECR_REPOSITORY_URL }} | |
| tags: | | |
| type=ref,event=branch | |
| type=sha,priority=900 | |
| type=raw,value=latest | |
| # Setup Docker buildx with Depot builder so imagetools have access to Depot cache | |
| - uses: depot/use-action@v1 | |
| - name: Publish Image | |
| uses: kphrx/docker-buildx-imagetools-action@v0.1.2 | |
| with: | |
| sources: ${{ needs.docker-build-mcp.outputs.image }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| # Publish to production Amazon ECR on release | |
| docker-publish-ecr-mcp: | |
| name: Publish MCP image to ECR | |
| needs: [docker-build-mcp] | |
| if: github.event_name == 'release' | |
| runs-on: depot-ubuntu-latest | |
| # The OIDC role trusts jobs running in the production environment. | |
| environment: production | |
| outputs: | |
| image: ${{ vars.MCP_ECR_REPOSITORY_URL }}:${{ steps.meta.outputs.version }} | |
| permissions: | |
| contents: read | |
| packages: read | |
| id-token: write | |
| steps: | |
| - name: Cloning repo | |
| uses: actions/checkout@v5 | |
| with: | |
| sparse-checkout: depot.json | |
| sparse-checkout-cone-mode: false | |
| - name: Login to Github Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ vars.MCP_ECR_GITHUB_ROLE_ARN }} | |
| aws-region: eu-west-2 | |
| - name: Login to Amazon ECR | |
| uses: aws-actions/amazon-ecr-login@v1 | |
| - name: Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ vars.MCP_ECR_REPOSITORY_URL }} | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=raw,value=latest | |
| # Setup Docker buildx with Depot builder so imagetools have access to Depot cache | |
| - uses: depot/use-action@v1 | |
| - name: Publish Image | |
| uses: kphrx/docker-buildx-imagetools-action@v0.1.2 | |
| with: | |
| sources: ${{ needs.docker-build-mcp.outputs.image }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| deploy-ecr-staging-mcp: | |
| name: Deploy MCP to staging | |
| needs: [docker-publish-ecr-staging-mcp] | |
| if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' | |
| runs-on: depot-ubuntu-latest | |
| environment: staging | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Cloning repo | |
| uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 | |
| with: | |
| persist-credentials: false | |
| - name: Deploy MCP to ECS | |
| uses: ./.github/actions/mcp-deploy-ecs | |
| with: | |
| role-to-assume: ${{ vars.MCP_ECR_GITHUB_ROLE_ARN }} | |
| cluster: ${{ vars.AWS_ECS_CLUSTER_NAME }} | |
| service: ${{ vars.AWS_ECS_MCP_SERVICE_NAME }} | |
| image: ${{ needs.docker-publish-ecr-staging-mcp.outputs.image }} | |
| deploy-ecr-mcp: | |
| name: Deploy MCP to production | |
| needs: [docker-publish-ecr-mcp] | |
| if: github.event_name == 'release' | |
| runs-on: depot-ubuntu-latest | |
| # The OIDC role trusts jobs running in the production environment. | |
| environment: production | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - name: Cloning repo | |
| uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 | |
| with: | |
| persist-credentials: false | |
| - name: Deploy MCP to ECS | |
| uses: ./.github/actions/mcp-deploy-ecs | |
| with: | |
| role-to-assume: ${{ vars.MCP_ECR_GITHUB_ROLE_ARN }} | |
| cluster: ${{ vars.AWS_ECS_CLUSTER_NAME }} | |
| service: ${{ vars.AWS_ECS_MCP_SERVICE_NAME }} | |
| image: ${{ needs.docker-publish-ecr-mcp.outputs.image }} |