-
Notifications
You must be signed in to change notification settings - Fork 20
60 lines (47 loc) · 1.53 KB
/
build-dwapi-3.xlatest.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
name: Build and Deploy to 3.xLatest
on:
push:
branches:
- DwapiKenyaemr3.xLatest
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '2.1.x' # Use the appropriate version for your project
- name: Install Node.js and npm
uses: actions/setup-node@v2
with:
node-version: '14.17.6'
- name: Install dependencies
run: npm install
working-directory: src/Dwapi
- name: Build the ASP.NET app
run: dotnet build src/Dwapi/Dwapi.csproj --configuration Release
- name: Build the angular UI
run: npm run build
working-directory: src/Dwapi
- name: Build the project
run: dotnet publish src/Dwapi/Dwapi.csproj -c Release -o ./publish
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# - name: Docker user Creds
# run: echo ${{secrets.DOCKER_USERNAME}} | sed 's/./& /g'
# - name: Docker pass Creds
# run: echo "${{secrets.DOCKER_PASSWORD}}" | sed 's/./& /g'
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: "${{secrets.DOCKER_PASSWORD}}"
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: kenyahmis/dwapi:3.xLatest