-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.28 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
jobs:
build:
runs-on: ubuntu-latest
container: dockfool/cake-docker:latest
steps:
- name: Checkout source
uses: actions/[email protected]
with:
fetch-depth: 0
submodules: recursive
- name: Cache packages
uses: actions/[email protected]
with:
path: ${{ env.NUGET_PACKAGES }}
key: ${{ runner.os }}-nuget-${{ hashFiles('.config/dotnet-tools.json', '**/packages.lock.json') }}
restore-keys: ${{ runner.os }}-nuget-
- name: Docker login
if: github.event_name != 'pull_request'
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Setup buildx
uses: docker/[email protected]
- name: Export runtime
uses: crazy-max/[email protected]
- name: Cake build
run: dotnet tool restore && dotnet cake --verbosity=verbose --publish=true