Skip to content

v3.10.0

v3.10.0 #840

Workflow file for this run

name: CI
on:
pull_request:
release:
types: ["published"]
push:
branches:
- dev
- test
- next
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use .NET Core SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0
- name: Install dependencies
run: dotnet restore src
- name: Build
run: dotnet build src/Gameboard.Api.sln -c Release --no-restore
- name: Run unit tests
run: dotnet test src/Gameboard.Api.Tests.Unit --no-restore
- name: Run integration tests
run: dotnet test src/Gameboard.Api.Tests.Integration --no-restore
build:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Docker meta
id: docker_meta
uses: crazy-max/ghaction-docker-meta@v1
with:
images: cmusei/gameboard-api
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
build-args: commit=${{ github.sha }}
labels: ${{ steps.docker_meta.outputs.labels }}