Skip to content

chore(deps): update dependency sonaranalyzer.csharp to v9.16.0.82469 … #28

chore(deps): update dependency sonaranalyzer.csharp to v9.16.0.82469 …

chore(deps): update dependency sonaranalyzer.csharp to v9.16.0.82469 … #28

Workflow file for this run

name: Release and Deploy API
on:
push:
branches:
- main
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
outputs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Google Artifact Registry
uses: docker/login-action@v3
with:
registry: europe-west6-docker.pkg.dev
username: _json_key
password: ${{ secrets.GOOGLE_DEPLOYER }}
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 19
extra_plugins: |
@codedependant/semantic-release-docker
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy:
name: Deploy API on Google Cloud Platform
runs-on: ubuntu-latest
needs:
- release
if: needs.release.outputs.new_release_published == 'true'
steps:
- uses: actions/checkout@v4
- name: Google Cloud Credentials
uses: google-github-actions/auth@v2
with:
credentials_json: "${{ secrets.GOOGLE_DEPLOYER }}"
- uses: hashicorp/setup-terraform@v3
- run: terraform init
working-directory: infrastructure
- run: terraform apply -auto-approve
working-directory: infrastructure
env:
TF_VAR_release_version: ${{ needs.release.outputs.new_release_version }}
TF_VAR_zitadel_auth: ${{ secrets.ZITADEL_DEPLOYER }}