Skip to content

chore(deps): update all dependencies #190

chore(deps): update all dependencies

chore(deps): update all dependencies #190

Workflow file for this run

name: Combined CI / Release
on:
workflow_dispatch:
push:
tags:
- '*'
branches:
- '**'
env:
IS_RELEASE: ${{ startsWith(github.ref, 'refs/tags/') }}
jobs:
ci_cd:
runs-on: ubuntu-latest
steps:
- name: Workflow Dispatch and wait
if: ${{ contains(github.ref, 'renovate/playwright') }}
uses: aurelien-baudet/[email protected]
with:
workflow: Playwright
token: ${{ secrets.GITHUB_TOKEN }}
wait-for-completion: true
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
- name: Write release version
if: ${{ env.IS_RELEASE == 'true' }}
run: |
VERSION=${GITHUB_REF_NAME#v}
echo Version: $VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Restore dependencies
run: dotnet restore ScreenshotCreator.sln
- name: Begin Sonar scan
run: |
dotnet tool install --global dotnet-sonarscanner
dotnet sonarscanner begin /k:mu88_ScreenshotCreator /o:mu88 /d:sonar.token=${{ secrets.SONAR_TOKEN }} /d:sonar.host.url=https://sonarcloud.io /d:sonar.cs.opencover.reportsPaths=tests/Tests/coverage.opencover.xml
- name: Build
run: dotnet build --no-restore ScreenshotCreator.sln
- name: Test and collect coverage
run: dotnet test --no-build /p:CollectCoverage=true /p:CoverletOutputFormat=opencover '/p:ExcludeByFile=\"**/Log.Prefix.cs\"' --filter "TestCategory=Unit|TestCategory=Integration"
- name: End Sonar scan
run: dotnet sonarscanner end /d:sonar.token=${{ secrets.SONAR_TOKEN }}
- name: Run system and performance tests
run: dotnet test --no-build --filter "TestCategory=System|TestCategory=Performance"
- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: registry.hub.docker.com
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker non-release
if: ${{ env.IS_RELEASE != 'true' }}
run: |
dotnet publish src/ScreenshotCreator.Api/ScreenshotCreator.Api.csproj /t:MultiArchPublish '-p:ContainerImageTags="dev"' -p:ContainerRegistry=registry.hub.docker.com
- name: Build and push Docker release
if: ${{ env.IS_RELEASE == 'true' }}
run: |
dotnet publish src/ScreenshotCreator.Api/ScreenshotCreator.Api.csproj /t:MultiArchPublish '-p:ContainerImageTags="${{ env.VERSION }};latest"' -p:ContainerRegistry=registry.hub.docker.com