Skip to content

Bump app version to 1.0.11 #15

Bump app version to 1.0.11

Bump app version to 1.0.11 #15

Workflow file for this run

name: Api Staging Deploy
on:
push:
branches:
- "staging"
paths:
- "api/**"
- ".github/workflows/api-cd-staging.yml"
workflow_dispatch:
jobs:
build-api:
permissions:
id-token: write
contents: read
name: Build and push staging image to Google ACR
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
- id: "setup-qemu"
- id: "setup-qemu"
name: Set up QEMU
uses: docker/setup-qemu-action@v3
- id: "docker-buildx-setup"
- id: "docker-buildx-setup"
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v2"
- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v2"
with:
create_credentials_file: true
token_format: access_token
workload_identity_provider: "projects/5685154754/locations/global/workloadIdentityPools/cd-beerpong/providers/github-actions"
service_account: "[email protected]"

Check failure on line 43 in .github/workflows/api-staging-cd.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/api-staging-cd.yml

Invalid workflow file

You have an error in your yaml syntax on line 43
- id: "login-gar"
workload_identity_provider: "projects/5685154754/locations/global/workloadIdentityPools/cd-beerpong/providers/github-actions"
service_account: "[email protected]"
- id: "login-gar"
name: "Login to GAR"
uses: docker/login-action@v3
with:
registry: europe-west10-docker.pkg.dev/beer-pong-441815/api-beerpong
username: oauth2accesstoken
password: ${{ steps.auth.outputs.access_token }}
- id: "build-and-push"
name: "Build and Push docker Image"
- id: "build-and-push"
name: "Build and Push docker Image"
uses: docker/build-push-action@v6
with:
push: true
context: api
file: ./api/Dockerfile
platforms: linux/amd64
tags: europe-west10-docker.pkg.dev/beer-pong-441815/api-beerpong/api-staging:${{ github.sha }}
deploy-api:
permissions:
id-token: write
contents: read
name: "Deploy staging api on Cloud Run"
runs-on: ubuntu-latest
defaults:
run:
shell: bash
needs: build-api
steps:
- name: Checkout
uses: actions/checkout@v4
- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v2"
- id: "auth"
name: "Authenticate to Google Cloud"
uses: "google-github-actions/auth@v2"
with:
create_credentials_file: true
token_format: access_token
workload_identity_provider: "projects/5685154754/locations/global/workloadIdentityPools/cd-beerpong/providers/github-actions"
service_account: "[email protected]"
- id: "deploy"
uses: "google-github-actions/deploy-cloudrun@v2"
workload_identity_provider: "projects/5685154754/locations/global/workloadIdentityPools/cd-beerpong/providers/github-actions"
service_account: "[email protected]"
- id: "deploy"
uses: "google-github-actions/deploy-cloudrun@v2"
with:
service: "api-springboot-staging"
image: "europe-west10-docker.pkg.dev/beer-pong-441815/api-beerpong/api-staging:${{ github.sha }}"
service: "api-springboot-staging"
image: "europe-west10-docker.pkg.dev/beer-pong-441815/api-beerpong/api-staging:${{ github.sha }}"
region: europe-west10
flags: "--port=8080 --add-cloudsql-instances=beer-pong-441815:europe-west10:beerpong-staging-db --no-cpu-throttling --min-instances 0 --max-instances 1 --allow-unauthenticated"
env_vars: |
POSTGRES_USER=postgres
POSTGRES_URL=jdbc:postgresql:///beerpong-staging?cloudSqlInstance=beer-pong-441815:europe-west10:api-beerpong-pg&socketFactory=com.google.cloud.sql.postgres.SocketFactory
API_BASE_URL=https://beerpong.lb.staging.laurinnotemann.dev
secrets: |-
POSTGRES_PASSWORD=api-pg-password:latest