-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Cloud Run deployment workflow and OpenAI setup in README
- Loading branch information
Showing
3 changed files
with
51 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Deploy to Cloud Run | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
PROJECT_ID: eyeris-443322 | ||
SERVICE_NAME: eyeris | ||
REGION: us-central1 | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Google Auth | ||
id: auth | ||
uses: google-github-actions/auth@v2 | ||
with: | ||
workload_identity_provider: ${{ secrets.WIF_PROVIDER }} | ||
service_account: ${{ secrets.WIF_SERVICE_ACCOUNT }} | ||
|
||
- name: Set up Cloud SDK | ||
uses: google-github-actions/setup-gcloud@v2 | ||
|
||
- name: Authorize Docker push | ||
run: gcloud auth configure-docker | ||
|
||
- name: Build and Push Container | ||
run: |- | ||
docker build -t gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE_NAME }}:${{ github.sha }} . | ||
docker push gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE_NAME }}:${{ github.sha }} | ||
- name: Deploy to Cloud Run | ||
uses: google-github-actions/deploy-cloudrun@v2 | ||
with: | ||
service: ${{ env.SERVICE_NAME }} | ||
region: ${{ env.REGION }} | ||
image: gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE_NAME }}:${{ github.sha }} |
This file contains 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
This file contains 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