-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (44 loc) · 1.83 KB
/
ci.yml
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: Continous integration build and publish
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.400
- name: Build
run: dotnet build --configuration Release /p:AssemblyVersion=1.0.6
- name: Test
run: dotnet test --no-build --configuration Release
- name: Publish API
run: dotnet publish --no-build ./src/HftApi/HftApi.csproj --output ./publish-api --configuration Release
- name: Publish worker
run: dotnet publish --no-build ./src/HftApi.Worker/HftApi.Worker.csproj --output ./publish-worker --configuration Release
- name: Check api dir
run: ls ./publish-api
- name: Check worker dir
run: ls ./publish-worker
- name: Publish API to registry
uses: swisschain/Publish-Docker-Github-Action@master
with:
name: swisschains/lykke-hftapi-v2:latest
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: ./publish-api
# snapshot: true # use snapshot to push an additional image, which is tagged with {YEAR}{MONTH}{DAY}{HOUR}{MINUTE}{SECOND}{first 6 digits of the git sha}
tag_names: true
- name: Publish worker to registry
uses: swisschain/Publish-Docker-Github-Action@master
with:
name: swisschains/lykke-hftapi-v2-worker:latest
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
workdir: ./publish-worker
# snapshot: true # use snapshot to push an additional image, which is tagged with {YEAR}{MONTH}{DAY}{HOUR}{MINUTE}{SECOND}{first 6 digits of the git sha}
tag_names: true