Skip to content

Merge pull request #34 from lvapeab/master #6

Merge pull request #34 from lvapeab/master

Merge pull request #34 from lvapeab/master #6

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: ${{ secrets.GCLOUD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCLOUD_SERVICE_ACCOUNT }}
- name: Deploy to Cloud Run
uses: google-github-actions/deploy-cloudrun@v2
with:
service: feb-stats
region: europe-west9
image: lvapeab/feb-stats:latest