upgrade to .net8.0 #33
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 publish and test | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET 8 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Install dependencies | |
run: | | |
cd src | |
dotnet restore | |
- name: Build | |
run: | | |
cd src | |
dotnet build --configuration Release --no-restore | |
- name: Test | |
run: | | |
cd src | |
dotnet test --no-restore --verbosity normal | |
- name: Login to Docker Hub | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Build and Push the Docker image | |
run: | | |
cd src | |
docker build -f WebSSH/Server/Dockerfile -t qiuhaotc/webssh:latest . | |
docker push qiuhaotc/webssh:latest |