Overflow/.github/workflows/ci.yml
Andy Pack 452320e76f
Some checks are pending
ci / build (8.0.x) (push) Waiting to run
ci / build-Docker (push) Blocked by required conditions
ignore missing js step
2024-06-09 18:44:44 +01:00

53 lines
1.4 KiB
YAML

name: ci
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dotnet-version: [ '8.0.x' ]
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install Dependencies
run: dotnet restore Overflow.sln
- name: Build
run: dotnet build --configuration Debug --no-restore Overflow.sln
- name: Test
run: dotnet test --no-restore --verbosity normal Overflow.sln
build-Docker:
runs-on: ubuntu-latest
needs: [build] # for ignoring bad builds
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Web Container
uses: docker/build-push-action@v5
with:
push: true
tags: |
sarsoo/overflow:latest
sarsoo/overflow:${{ github.ref_name }}
file: Dockerfile