Skip to content

updated debian image #26

updated debian image

updated debian image #26

Workflow file for this run

name: cd
on:
push:
branches: [main]
jobs:
deploy:
name: deploy
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Build app
run: ./scripts/buildprod.sh
- id: "auth"
uses: "google-github-actions/auth@v2"
with:
credentials_json: "${{ secrets.GCP_CREDENTIALS }}"
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Build & Push Docker Image
run: "gcloud builds submit --tag us-east1-docker.pkg.dev/xoracle/xoracle-repo/xoracle:latest ."
- name: Deploy to Cloud Run
run: "gcloud run deploy xoracle --image us-east1-docker.pkg.dev/xoracle/xoracle-repo/xoracle:latest --region us-east1 --allow-unauthenticated --project xoracle --max-instances=4"
- name: Log into DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: sutats/xoracle:latest