Skip to content

Update docker-image.yml #8

Update docker-image.yml

Update docker-image.yml #8

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "deployed" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@v4
- id: auth
name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
with:
project_id: 'ecomscraper'
service_account: '[email protected]'
workload_identity_provider: 'projects/686267651726/locations/global/workloadIdentityPools/pool1/providers/aws1'
- name: Build the Docker image
run: |-
cd ottpApi
docker build -t ottpapi .
docker tag ottpapi:latest asia-south1-docker.pkg.dev/ecomscraper/images/ottpapi:latest
docker push asia-south1-docker.pkg.dev/ecomscraper/images/ottpapi:latest
gcloud run deploy \
--image=asia-south1-docker.pkg.dev/ecomscraper/images/ottpapi:latest \
--platform=managed \
--region=asia-south1 \
--allow-unauthenticated