Bump HtmlAgilityPack from 1.12.1 to 1.12.2 #153
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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: Build and publish | |
on: | |
push: | |
branches: [ "main" ] | |
tags: | |
- release-** | |
pull_request: | |
branches: [ "main" ] | |
tags: | |
- release-** | |
jobs: | |
testing: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build Debug | |
run: dotnet build --no-restore | |
- name: Test | |
run: dotnet test --no-build --verbosity normal | |
building: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build Release | |
run: dotnet build -c Release | |
- name: Set short SHA | |
run: | | |
echo "SHORT_SHA=$(echo ${GITHUB_SHA} | cut -c1-7)" >> $GITHUB_ENV | |
echo "BUILD_PATH=${{ github.workspace }}/ChatWithAI/bin/Release/net8.0" >> $GITHUB_ENV | |
- name: Publish to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ChatWithAI_${{ env.SHORT_SHA }} | |
path: ${{ env.BUILD_PATH }}/* | |
- name: Publish to Docker | |
if: startsWith(github.ref, 'refs/tags/release') | |
env: | |
DOCKER_USER: ${{ secrets.DOCKER_USER }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD | |
docker build -f ${{ github.workspace }}/Dockerfile ${{ env.BUILD_PATH }} -t ${{ secrets.DOCKER_USER }}/${{ secrets.DOCKER_REPO }}:${{ env.SHORT_SHA }} | |
docker push ${{ secrets.DOCKER_USER }}/${{ secrets.DOCKER_REPO }}:${{ env.SHORT_SHA }} |