CI Pipeline #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##################################################################################################### | |
# CI Pipeline for Expense Tracker Backend. | |
# This pipeline is responsible for building, testing, and releasing. | |
# It uses the following reusable workflow: | |
# - .github/workflows/dotnet-web-reusable.yml | |
##################################################################################################### | |
name: CI Pipeline | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
branches: | |
- main | |
paths-ignore: | |
- "**/README.md" | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- "**/README.md" | |
workflow_call: | |
inputs: | |
enable_quality_gates: | |
required: true | |
type: boolean | |
default: true | |
enable_release: | |
required: true | |
type: boolean | |
default: false | |
workflow_dispatch: | |
inputs: | |
enable_quality_gates: | |
description: "Enable quality gates (e.g., unit tests, SonarCloud, etc.)" | |
required: true | |
type: boolean | |
default: true | |
enable_release: | |
description: "Enable release (e.g., Docker image, GitHub release, etc.)" | |
required: true | |
type: boolean | |
default: false | |
jobs: | |
call-build-workflow: | |
uses: Xhaguatende/reusable-workflows/.github/workflows/dotnet-web-reusable.yml@main | |
with: | |
enable_quality_gates: ${{ github.event.inputs.enable_quality_gates == 'true' || github.event.inputs.enable_quality_gates == true }} | |
enable_release: ${{ github.event.inputs.enable_release == 'true' || github.event.inputs.enable_release == true }} | |
dotnet_version: "9.x" | |
sonar_cloud_organization: "xhaguatende-01" | |
sonar_cloud_project_key: "Xhaguatende_expense-tracker-backend" | |
publish_project: "./ExpenseTracker.Api/ExpenseTracker.Api.csproj" | |
docker_file: "./docker/Dockerfile.Api" | |
docker_hub_repository: "expense-tracker-backend" | |
docker_image_title: "Expense Tracker API" | |
docker_image_description: "Docker image for Expense Tracker Backend" | |
has_mongodb_migration: true | |
secrets: inherit |