BAH-3773 | Add. link patient abha identifier after successful linking #367
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI action | |
on: | |
push: | |
branches: | |
- master | |
- 'release-*' | |
- BAH-3773 | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build-publish-docker-helm: | |
name: Build & Publish Docker Image & Helm Chart | |
runs-on: ubuntu-latest | |
env: | |
HELM_CHART_PATH: package/helm/ | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup dotnet core '6.0.401' | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '6.0.401' | |
- name: Build with dotnet | |
run: dotnet build hip-service.sln | |
# - name: Run unit tests | |
# run: dotnet test hip-service.sln | |
- name: Set env.ARTIFACT_VERSION | |
run: | | |
wget -q https://raw.githubusercontent.com/Bahmni/bahmni-infra-utils/main/setArtifactVersion.sh && chmod +x setArtifactVersion.sh | |
./setArtifactVersion.sh | |
rm setArtifactVersion.sh | |
# - name: Test coverage | |
# run: dotnet test test/In.ProjectEKA.HipServiceTest/In.ProjectEKA.HipServiceTest.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=opencover | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Docker Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
file: package/docker/Dockerfile | |
push: true | |
tags: bahmniindiadistro/hip:${{env.ARTIFACT_VERSION}},bahmniindiadistro/hip:latest | |
# - name: Helm - Update Version and Image Tag | |
# run: | | |
# yq --inplace '.image.tag = "${{ env.ARTIFACT_VERSION }}"' $HELM_CHART_PATH/values.yaml | |
# yq --inplace '.version = "${{ env.ARTIFACT_VERSION }}"' $HELM_CHART_PATH/Chart.yaml | |
# | |
# - name: Helm Lint | |
# run: helm lint $HELM_CHART_PATH | |
# | |
# - name: Helm Package | |
# run: helm package $HELM_CHART_PATH | |
# | |
# - name: Helm - Checkout Charts Repository | |
# uses: actions/checkout@v2 | |
# with: | |
# repository: Bahmniindiadistro/helm-charts | |
# ref: gh-pages | |
# path: helm-charts | |
# persist-credentials: false | |
# | |
# - name: Helm - Copy chart | |
# run: mkdir -p helm-charts/hip/ && cp hip-${{ env.ARTIFACT_VERSION }}.tgz helm-charts/hip/ | |
# | |
# - name: Helm - reIndex | |
# working-directory: helm-charts/ | |
# run: helm repo index --merge index.yaml --url https://bahmniindiadistro.github.io/helm-charts/ . | |
# | |
# - name: Helm - Publish Chart | |
# working-directory: helm-charts/ | |
# run: | | |
# git config user.name ${{ secrets.BAHMNI_USERNAME}} | |
# git config user.email ${{ secrets.BAHMNI_EMAIL}} | |
# git add . | |
# git commit -m "Release of hip-${{ env.ARTIFACT_VERSION }}" | |
# git push 'https://${{ secrets.BAHMNI_USERNAME}}:${{ secrets.BAHMNI_PAT}}@github.com/bahmniindiadistro/helm-charts.git' gh-pages | |