Skip to content

Bump AutoMapper and 27 others #109

Bump AutoMapper and 27 others

Bump AutoMapper and 27 others #109

Workflow file for this run

name: Document API CI
on:
push:
paths:
- 'Document/**'
- '.github/workflows/document-api.yml'
pull_request:
paths:
- 'Document/**'
- '.github/workflows/document-api.yml'
jobs:
setup:
uses: ./.github/workflows/setup-dotnet.yml
with:
dotnet_version: '8.0'
lint:
uses: ./.github/workflows/lint.yml
needs: setup
with:
solution_path: DocumentManagementSystem.sln
format:
uses: ./.github/workflows/format-check.yml
needs: setup
with:
solution_path: DocumentManagementSystem.sln
secrets:
uses: ./.github/workflows/gitguardian.yml
needs: setup
with:
base_branch: 'origin/main'
secrets:
GG_SHIELD_API_KEY: ${{ secrets.GG_SHIELD_API_KEY }}
build:
runs-on: ubuntu-latest
needs: [lint, format, secrets]
steps:
- uses: actions/checkout@v4
- run: |
cd Document/Document.API
dotnet restore
dotnet build --configuration Release
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- run: dotnet restore Document/Document.Api.Test/Document.Api.Test.csproj
- run: |
cd Document/Document.Api.Test
dotnet test --configuration Release
- uses: actions/upload-artifact@v4
with:
name: document-api-test-results
path: Document/Document.Api.Test/TestResults
docker:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin
- run: docker build -t gyliana/document-api:${{ github.sha }} -f Document/Document.API/Dockerfile .
- run: docker push gyliana/document-api:${{ github.sha }}
- run: docker tag gyliana/document-api:${{ github.sha }} gyliana/document-api:latest
- run: docker push gyliana/document-api:latest
snyk:
uses: ./.github/workflows/snyk.yml
needs: test
with:
solution_path: DocumentManagementSystem.sln
secrets:
snyk_token: ${{ secrets.SNYK_TOKEN }}