Skip to content

chore: adds service account email address #77

chore: adds service account email address

chore: adds service account email address #77

Workflow file for this run

name: Deploy to Google Cloud Run
on:
push:
branches:
- main
env:
PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
REGION: europe-west3
IMAGE_URL: europe-west3-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/getactions/production:latest
europe-west3-docker.pkg.dev/getactions-v1/getactions
jobs:
build-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun i --frozen-lockfile
- name: Populate latest workflows
run: bun run populate-workflows
- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v2
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
workload_identity_provider: ${{ secrets.GCP_IDENTITY_PROVIDER }}
service_account: '${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }}'
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: Configure Docker for Google Artifact Registry
run: gcloud auth configure-docker ${{ env.REGION }}-docker.pkg.dev
- name: Build container image
run: docker build . --tag ${{ env.IMAGE_URL }}
- name: Push container image
run: docker push ${{ env.IMAGE_URL }}
- name: Deploy to Cloud Run
run: |
gcloud run deploy production \
--image ${{ env.IMAGE_URL }} \
--platform managed \
--region ${{ env.REGION }} \
--allow-unauthenticated