Skip to content

Bump the serilog group with 2 updates #288

Bump the serilog group with 2 updates

Bump the serilog group with 2 updates #288

Workflow file for this run

name: deploy
on:
pull_request:
branches:
- main
paths:
- "src/**"
- "Directory.Build.props"
- "Dockerfile"
- ".github/workflows/deploy.yml"
push:
branches:
- main
paths:
- "src/**"
- "Directory.Build.props"
- "Dockerfile"
- ".github/workflows/deploy.yml"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
environment: Azure
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v5
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
logout: true
- name: Build image
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
load: true
pull: false
no-cache: true
tags: ${{ vars.IMAGE }}
env:
DOCKER_BUILD_SUMMARY: false
DOCKER_BUILD_RECORD_UPLOAD: false
deploy:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
needs: build
environment: Azure
permissions:
id-token: write
contents: read
steps:
- name: Azure login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Deploy
uses: azure/container-apps-deploy-action@v2
with:
resourceGroup: ${{ vars.RESOURCE_GROUP_NAME}}
containerAppEnvironment: ${{ vars.CONTAINER_APP_ENVIRONMENT }}
containerAppName: ${{ vars.CONTAINER_APP_NAME}}
imageToDeploy: ${{ vars.IMAGE }}
registryUrl: ${{ vars.REGISTRY_URL }}
registryUsername: ${{ secrets.DOCKERHUB_USERNAME }}
registryPassword: ${{ secrets.DOCKERHUB_TOKEN }}
targetPort: ${{ vars.CONTAINER_PORT }}
environmentVariables: >
ASPNETCORE_ENVIRONMENT=Production
KEY_VAULT_NAME=${{ secrets.KEY_VAULT_NAME }}