Skip to content

Merge pull request #30 from lvapeab/master #4

Merge pull request #30 from lvapeab/master

Merge pull request #30 from lvapeab/master #4

Workflow file for this run

name: Build and Deploy
on:
push:
branches:
- production
jobs:
build-and-push:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to Docker Hub
uses: docker/#-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Build
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: lvapeab/feb-stats:latest
cache-from: type=registry,ref=lvapeab/feb-stats:latest
cache-to: type=inline
- name: Google Auth
uses: google-github-actions/auth@v2
with:
workload_identity_provider: projects/${{ secrets.GCLOUD_PROJECT_NUMBER }}/locations/global/workloadIdentityPools/github/providers/feb-stats
service_account: deploy-cloudrun@${{ secrets.GCLOUD_PROJECT_ID }}.iam.gserviceaccount.com
- name: Deploy to Cloud Run
uses: google-github-actions/deploy-cloudrun@v2
with:
service: feb-stats
region: europe-west9
image: lvapeab/feb-stats:latest