269 | Fix. Integration Service creates a community visit for patients… #30
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: Build and Publish | |
on: | |
push: | |
branches: | |
- main | |
- 'release-*' | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
workflow_dispatch: | |
jobs: | |
build-int-admin-app: | |
name: Build Integration Admin App | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Avni Integration Service Admin App Repository | |
uses: actions/checkout@v3 | |
with: | |
repository: avniproject/integration-admin-app | |
- name: Use Node 16 | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: Install admin app dependencies | |
run: yarn install | |
- name: Build admin app | |
env: | |
REACT_APP_SERVER_API: /int | |
run: yarn build | |
- uses: actions/upload-artifact@v3 | |
name: Upload build artifact | |
with: | |
name: integration-admin-app-build | |
path: build/ | |
build-publish-docker: | |
name: Build & Publish Docker Image | |
runs-on: ubuntu-latest | |
needs: [build-int-admin-app] | |
steps: | |
- name: Checkout Avni Integration Service Repository | |
uses: actions/checkout@v3 | |
- 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: Setup Java 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: '17' | |
- name: Build and Package Avni Server | |
run: make build-server | |
- uses: actions/download-artifact@v3 | |
with: | |
name: integration-admin-app-build | |
path: int-admin-app-build/ | |
- 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 | |
push: true | |
tags: bahmnihwc/avni-integration-service:latest, bahmnihwc/avni-integration-service:${{env.ARTIFACT_VERSION}} |