-
Notifications
You must be signed in to change notification settings - Fork 36
75 lines (59 loc) · 2.46 KB
/
push-to-docker-hub.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: push-to-docker-hub
on:
workflow_dispatch:
inputs:
imageTag:
description: Docker image tag to be applied
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Building and copying React
- name: npm install durablefunctionsmonitor.react
run: npm install -legacy-peer-deps
working-directory: durablefunctionsmonitor.react
- name: npm build durablefunctionsmonitor.react
run: npm run build
working-directory: durablefunctionsmonitor.react
- name: copy statics to durablefunctionsmonitor.dotnetbackend/DfmStatics
run: |
rm -rf durablefunctionsmonitor.dotnetbackend/DfmStatics
cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetbackend/DfmStatics
- name: copy statics to durablefunctionsmonitor.dotnetisolated/DfmStatics
run: |
rm -rf durablefunctionsmonitor.dotnetisolated/DfmStatics
cp -r durablefunctionsmonitor.react/build durablefunctionsmonitor.dotnetisolated/DfmStatics
# Building and testing .NET
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests
run: dotnet test tests/durablefunctionsmonitor.dotnetbackend.tests/*.csproj
- name: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests
run: dotnet test tests/durablefunctionsmonitor.dotnetisolated.core.tests/*.csproj
- name: login to Docker hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: build and push durablefunctionsmonitor.dotnetbackend
uses: docker/build-push-action@v6
with:
context: ./durablefunctionsmonitor.dotnetbackend
push: true
tags: scaletone/durablefunctionsmonitor:${{ github.event.inputs.imageTag }}
- name: build and push custom-backends/mssql
uses: docker/build-push-action@v6
with:
context: ./custom-backends/mssql
push: true
tags: scaletone/durablefunctionsmonitor.mssql:${{ github.event.inputs.imageTag }}
- name: build and push custom-backends/netherite
uses: docker/build-push-action@v6
with:
context: ./custom-backends/netherite
push: true
tags: scaletone/durablefunctionsmonitor.netherite:${{ github.event.inputs.imageTag }}