new feature: forward low-confidence ham to admin chat #41
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 Push Docker Image | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Extract version number | |
id: vars | |
run: echo "::set-output name=version::1.0.${{ github.run_number }}" | |
- name: Set lowercase repo name | |
run: echo "repo_name=${{ github.repository }}" | tr '[:upper:]' '[:lower:]' >> $GITHUB_ENV | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.x' # Specify your .NET version here | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Run tests | |
run: dotnet test --no-restore | |
- name: Build Docker image | |
run: docker build -t ghcr.io/${{ env.repo_name }}:latest -t ghcr.io/${{ env.repo_name }}:${{ steps.vars.outputs.version }} ./ClubDoorman | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push Docker image to GitHub Container Registry | |
run: | | |
docker push ghcr.io/${{ env.repo_name }}:latest | |
docker push ghcr.io/${{ env.repo_name }}:${{ steps.vars.outputs.version }} |