Skip to content

Feature/Develop MVP July 2025 #35

Feature/Develop MVP July 2025

Feature/Develop MVP July 2025 #35

Workflow file for this run

# purpose: run Continuous Integration (build, unit test, lint, scan)
# variables: [ SONAR_HOST_URL, SONAR_ORG, SONAR_PROJECT_KEY ]
# secrets: [ SONAR_TOKEN ]
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch: {}
concurrency:
group: "ci"
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout workflow parts
uses: actions/checkout@v4
with:
repository: devpro/github-workflow-parts
ref: feature/sonar-login-deprecation
path: workflow-parts
- name: Start MongoDB
uses: ./workflow-parts/mongodb/start
- name: Build, lint & test
uses: ./workflow-parts/dotnet/build-lint-test
with:
sonar_enabled: 'true'
sonar_organization: ${{ vars.SONAR_ORG }}
sonar_host_url: ${{ vars.SONAR_HOST_URL }}
sonar_project_name: Terraform Backend MongoDB
sonar_project_key: ${{ vars.SONAR_PROJECT_KEY }}
sonar_token: ${{ secrets.SONAR_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
image-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Checkout workflow parts
uses: actions/checkout@v3
with:
repository: devpro/github-workflow-parts
ref: feature/sonar-login-deprecation
path: workflow-parts
- name: Create and scan container image
uses: ./workflow-parts/docker/build-scan
with:
docker_file: 'src/WebApi/Dockerfile'
image_tag: 1.1.${{ github.run_id }}
image_path: 'docker.io/devprofr'
image_name: terraform-backend-mongodb
max_high_cves: 0
max_medium_cves: 0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}