Skip to content

Helm chart and doc website #45

Helm chart and doc website

Helm chart and doc website #45

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: main
path: workflow-parts
- name: Start MongoDB
uses: ./workflow-parts/mongodb/start
- name: Initialize database (indexes, tenants & users)
run: |
mongosh mongodb://localhost:27017/terraform_backend_dev scripts/mongo-create-index.js
sudo apt-get -y install apache2-utils
./scripts/mongo-create-user.sh admin admin123 dummy
mongosh mongodb://localhost:27017/terraform_backend_dev scripts/add-user.js
shell: bash
- 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: main
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 }}