Skip to content

Commit

Permalink
Merge pull request #13 from ronykris/deployed
Browse files Browse the repository at this point in the history
Deployed
  • Loading branch information
ronykris authored May 12, 2024
2 parents de7822e + 0e587b6 commit d0bc1cf
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 42 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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:
service_account: '[email protected]'
workload_identity_provider: 'projects/686267651726/locations/global/workloadIdentityPools/github-actions-cloud-run-pool/providers/github'

- name: Configure Docker Hub
run: |-
gcloud auth configure-docker asia-south1-docker.pkg.dev
gcloud auth login
- 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
42 changes: 0 additions & 42 deletions .github/workflows/ottpapi.yml

This file was deleted.

0 comments on commit d0bc1cf

Please sign in to comment.