update project to target .NET 8.0 and reflect changes in launch confi… #12
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: Build and deploy ASP.Net Core app to ACI | |
| on: | |
| push: | |
| paths: | |
| - "src/net-photo-gallery/**" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up .NET Core | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '6.0.x' | |
| - name: Build with dotnet | |
| run: dotnet build --configuration Release | |
| working-directory: 'src/net-photo-gallery' | |
| - name: dotnet publish | |
| run: dotnet publish -c Release -o publish | |
| working-directory: 'src/net-photo-gallery' | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Build and push | |
| if: github.ref == 'refs/heads/master' | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: 'src/net-photo-gallery' | |
| push: true | |
| tags: zimelemon/photogallery:latest | |