Merge pull request #12 from ProgrammingMadeEasy-Community/main #1
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: pwa_test_Ci | |
on: | |
push: | |
branches: | |
- Dev | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Restore dependencies | |
working-directory: ./PhotoWallArt/src/Host/ | |
run: dotnet restore | |
- name: Build | |
working-directory: ./PhotoWallArt/src/Host/ | |
run: dotnet build --no-restore | |
docker: | |
name: Docker Build & Push | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Docker Login | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build Image | |
working-directory: ./PhotoWallArt/src/Host/ | |
run: dotnet publish -c Release -p:ContainerImageName=${{ secrets.DOCKER_USERNAME }}/pwa_test | |
- name: Push Image | |
run: docker push ${{ secrets.DOCKER_USERNAME }}/pwa_test --all-tags |