Merge pull request #1101 from dlcs/feature/readme #2172
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
| name: DLCS Build, Test & Publish | |
| on: | |
| push: | |
| branches: [ "main", "develop" ] | |
| tags: [ "v*" ] | |
| pull_request: | |
| branches: [ "main", "develop" ] | |
| paths-ignore: | |
| - "docs/**" | |
| - "scripts/**" | |
| jobs: | |
| test-dotnet: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: src/protagonist | |
| env: | |
| BUILD_CONFIG: "Release" | |
| SOLUTION: "protagonist.sln" | |
| steps: | |
| - id: checkout | |
| uses: actions/checkout@v6 | |
| - id: setup-dotnet | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: "8.0.x" | |
| - id: restore-dotnet-dependencies | |
| run: dotnet restore $SOLUTION | |
| - id: build-dotnet | |
| run: dotnet build $SOLUTION --configuration $BUILD_CONFIG --no-restore | |
| - id: pre-pull-localstack | |
| run: docker pull localstack/localstack:4.13 | |
| - id: test-dotnet | |
| run: dotnet test $SOLUTION --filter 'Category!=Manual' --configuration $BUILD_CONFIG --no-restore --no-build --verbosity normal | |
| # only push images if non-draft PR OR 'build-image' tag is explicitly added | |
| build-push-images: | |
| runs-on: ubuntu-latest | |
| if: (github.event.pull_request.draft != true || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'build-image'))) | |
| needs: test-dotnet | |
| strategy: | |
| matrix: | |
| include: | |
| - image: "orchestrator" | |
| dockerfile: "Dockerfile.Orchestrator" | |
| - image: "thumbs" | |
| dockerfile: "Dockerfile.Thumbs" | |
| - image: "engine" | |
| dockerfile: "Dockerfile.Engine" | |
| - image: "portal" | |
| dockerfile: "Dockerfile.Portal" | |
| - image: "api" | |
| dockerfile: "Dockerfile.API" | |
| - image: "cleanuphandler" | |
| dockerfile: "Dockerfile.CleanupHandler" | |
| - image: "migrator" | |
| dockerfile: "Dockerfile.Migrator" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/docker-build-and-push | |
| with: | |
| image-name: ${{ matrix.image }} | |
| dockerfile: ${{ matrix.dockerfile }} | |
| context: "./src/protagonist" | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |