Skip to content

Fix dockerfile with mcr.microsoft.com/dotnet/sdk:7.0 #23

Fix dockerfile with mcr.microsoft.com/dotnet/sdk:7.0

Fix dockerfile with mcr.microsoft.com/dotnet/sdk:7.0 #23

Workflow file for this run

name: .NET Core
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
env:
working-directory: ./src
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.400
- name: List current directory
run: ls -R
working-directory: ${{env.working-directory}}
- name: Install dependencies
run: dotnet restore
working-directory: ${{env.working-directory}}
- name: Build
run: dotnet build --configuration Release --no-restore
working-directory: ${{env.working-directory}}
- name: Test
run: dotnet test --no-restore --verbosity normal
working-directory: ${{env.working-directory}}
- name: Echo the branch
run: |
echo ${{github.ref}}
- name: If-develop, publish docker
if: (contains(github.ref, 'develop'))
uses: docker/build-push-action@v1
with:
working-directory: ${{env.working-directory}}
dockerfile: ${{env.working-directory}}/MockApiServer/Dockerfile
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
repository: jdevil/mock-api-server
tag: latest