Docker file path #3
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: Build and deploy .NET | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build-api: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up .NET 8 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0' | |
- name: Build Docker Image | |
run: | | |
docker buildx build -t alenalex/myserve-http-api:master -f MyServe.Backend.Http.Api/Dockerfile | |
- name: Docker Login | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Push Docker Image | |
run: | | |
docker push alenalex/myserve-http-api:master |