Skip to content

fool-proofing against adding bot reports to dataset #40

fool-proofing against adding bot reports to dataset

fool-proofing against adding bot reports to dataset #40

Workflow file for this run

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 }}