File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,29 +75,35 @@ jobs:
7575 deploy-gcp :
7676 needs : docker-image
7777 runs-on : ubuntu-latest
78+ permissions :
79+ contents : read
80+ packages : read
7881
7982 steps :
8083 - name : Checkout repository
8184 uses : actions/checkout@v4
8285
86+ - name : Authenticate to Google Cloud
87+ uses : google-github-actions/auth@v2
88+ with :
89+ credentials_json : ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
90+
8391 - name : Set up gcloud
8492 uses : google-github-actions/setup-gcloud@v2
8593 with :
86- service_account_key : ${{ secrets.GCP_SERVICE_ACCOUNT_KEY }}
8794 project_id : ${{ secrets.GCP_PROJECT_ID }}
88- export_default_credentials : true
8995
9096 - name : Configure Docker for Artifact Registry
9197 run : |
92- gcloud auth configure-docker us-east1-docker.pkg.dev
98+ gcloud auth configure-docker us-east1-docker.pkg.dev --quiet
9399
94100 - name : Pull image from GHCR
95101 run : |
96102 IMAGE_ID=ghcr.io/${{ github.repository_owner }}/mcp-backend
97103 VERSION=${{ github.sha }}
98104 echo "IMAGE_ID=$IMAGE_ID" >> $GITHUB_ENV
99105 echo "VERSION=$VERSION" >> $GITHUB_ENV
100- echo "$GITHUB_TOKEN" | docker login ghcr.io -u "$GITHUB_ACTOR" --password-stdin
106+ echo "${{ secrets. GITHUB_TOKEN }} " | docker login ghcr.io -u "$GITHUB_ACTOR" --password-stdin
101107 docker pull $IMAGE_ID:$VERSION
102108
103109 - name : Tag and push image to Artifact Registry
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ ALTER TABLE public.deployment_logs
195195 └──────────────────────────┘
196196
197197Adding this line to test the workflows
198- Another test
198+ Another test2
199199
200200Test
201201```
You can’t perform that action at this time.
0 commit comments