Make schema and type dependencies tool return ToolError to avoid erro… #3
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 Push Docker Image | |
| on: | |
| push: | |
| branches: [ "dev" ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build and push 🚢 | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: read | |
| attestations: write | |
| id-token: write | |
| env: | |
| CHANNEL_TAG: dev | |
| REPO_FULL_NAME: ${{ github.repository }} | |
| REPO_SHORT_NAME: ${{ github.event.repository.name }} | |
| GCP_REGISTRY_PROJECT_ID: open-targets-eu-dev | |
| GCP_SERVICE_PROJECT_ID: open-targets-mcp-dev | |
| GCP_REGION: europe-west1 | |
| GCP_AR_REPO: platform-mcp | |
| GCP_SERVICE: paul-test | |
| steps: | |
| - id: set-envs | |
| run: | | |
| echo "GITHUB_IMAGE_NAME=ghcr.io/${{ env.REPO_FULL_NAME }}" >> $GITHUB_ENV | |
| echo "GOOGLE_IMAGE_NAME=${{ env.GCP_REGION }}-docker.pkg.dev/${{ env.GCP_REGISTRY_PROJECT_ID }}/${{ env.GCP_AR_REPO }}/${{ env.REPO_SHORT_NAME }}" >> $GITHUB_ENV | |
| - uses: actions/checkout@v4 | |
| - id: auth-google-registry | |
| name: Authenticate to Google Cloud for Artifact Registry | |
| uses: google-github-actions/auth@v3 | |
| with: | |
| token_format: access_token | |
| project_id: ${{ env.GCP_REGISTRY_PROJECT_ID }} | |
| workload_identity_provider: projects/426265110888/locations/global/workloadIdentityPools/github-actions/providers/opentargets | |
| service_account: github-actions@open-targets-eu-dev.iam.gserviceaccount.com | |
| access_token_lifetime: 300s | |
| - id: auth-gar | |
| name: Login to Google Artifact Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.GCP_REGION }}-docker.pkg.dev | |
| username: oauth2accesstoken | |
| password: ${{ steps.auth-google-registry.outputs.access_token }} | |
| - id: auth-ghcr | |
| name: Login to GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - id: push | |
| name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| tags: | | |
| ${{ env.GITHUB_IMAGE_NAME }}:${{ env.CHANNEL_TAG }} | |
| ${{ env.GOOGLE_IMAGE_NAME }}:${{ env.CHANNEL_TAG }} | |
| - id: generate-attestations | |
| name: Generate artifact attestation | |
| uses: actions/attest-build-provenance@v3 | |
| with: | |
| subject-name: ${{ env.GOOGLE_IMAGE_NAME }} | |
| subject-digest: ${{ steps.push.outputs.digest }} | |
| push-to-registry: true | |
| # - id: auth-google-deployment | |
| # name: Authenticate to Google Cloud for Deployment | |
| # uses: google-github-actions/auth@v3 | |
| # with: | |
| # token_format: access_token | |
| # project_id: ${{ env.GCP_SERVICE_PROJECT_ID }} | |
| # workload_identity_provider: projects/426265110888/locations/global/workloadIdentityPools/github-actions/providers/opentargets | |
| # service_account: platform-mcp-dev@open-targets-mcp-dev.iam.gserviceaccount.com | |
| # access_token_lifetime: 300s | |
| # - id: deploy | |
| # name: Deploy to Cloud Run | |
| # uses: google-github-actions/deploy-cloudrun@v2 | |
| # with: | |
| # service: ${{ env.GCP_SERVICE }} | |
| # region: ${{ env.GCP_REGION }} | |
| # image: ${{ env.GOOGLE_IMAGE_NAME }}:${{ env.CHANNEL_TAG }} |