Update dockerfile paths #25
This file contains 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: .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 |