Skip to content

added build and push docker image to Google Artifact Registry #5

added build and push docker image to Google Artifact Registry

added build and push docker image to Google Artifact Registry #5

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.23.0"
- name: Build
run: sh 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: 'Use gcloud CLI'
run: 'gcloud info'
- name: "Build the Docker image and push it to Google Artifact Registry"
run: gcloud builds submit --tag us-central1-docker.pkg.dev/power-outages-backend/power-outages-backend-ar-repo/power-outages-backend:latest .