Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/DwapiKenyaemr3.xLatest' into Dwa…
Browse files Browse the repository at this point in the history
…piKenyaemr3.xLatest
  • Loading branch information
MaryKilewe committed Nov 14, 2024
2 parents 2e5f918 + 6dfd827 commit bc95616
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build-dwapi-3.xlatest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build and Deploy to 3.xLatest

on:
push:
branches:
- dev

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

0 comments on commit bc95616

Please sign in to comment.