Add db script, update doc with Helm chart, add doc website (#10) #48
This file contains hidden or 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
| # 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: | | |
| ./scripts/tfbeadm create-indexes | |
| ./scripts/tfbeadm create-user admin admin123 dummy | |
| shell: bash | |
| env: | |
| MONGODB_URI: mongodb://localhost:27017/terraform_backend_dev | |
| - 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 }} |