From d3f9f27a4d3b5ea7b5958c4b67cf1f5cd65076a0 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Tue, 4 Oct 2022 21:16:22 -0700 Subject: [PATCH 1/5] Adding support for publishing frontend image --- .github/workflows/main.yml | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..fadceb48a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,51 @@ +name: Build Docker Image + +on: + pull_request: + branches: [main] + release: + types: [published] + push: + branches: [main] + workflow_dispatch: + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build-publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to the Container registry + uses: docker/login-action@v1 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Publish Docker Image + uses: docker/build-push-action@v3 + with: + context: ./frontend + platforms: linux/amd64,linux/arm64/v8 + push: true + tags: o3-distro-frontend:latest + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=inline,ref=user/app:buildcache + cache-to: type=inline,ref=user/app:buildcache,mode=max \ No newline at end of file From 66f0c90252b2cd6e52c6d95546ce5cc51eba1deb Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Tue, 4 Oct 2022 21:20:26 -0700 Subject: [PATCH 2/5] image name fix --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fadceb48a..519865bae 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,7 +45,7 @@ jobs: context: ./frontend platforms: linux/amd64,linux/arm64/v8 push: true - tags: o3-distro-frontend:latest + tags: ghcr.io/i-tech-uw/o3-distro-frontend:${{steps.meta.outputs.labels["org.opencontainers.image.version"]}} labels: ${{ steps.meta.outputs.labels }} cache-from: type=inline,ref=user/app:buildcache cache-to: type=inline,ref=user/app:buildcache,mode=max \ No newline at end of file From 21b5c69dae90addd0a00571923099be8a71daf71 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Tue, 4 Oct 2022 21:24:27 -0700 Subject: [PATCH 3/5] image name fix --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 519865bae..98ff6686b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ on: env: REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} + IMAGE_NAME: ${{ github.repository }}-frontend jobs: build-publish: @@ -45,7 +45,7 @@ jobs: context: ./frontend platforms: linux/amd64,linux/arm64/v8 push: true - tags: ghcr.io/i-tech-uw/o3-distro-frontend:${{steps.meta.outputs.labels["org.opencontainers.image.version"]}} + tags: $${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=inline,ref=user/app:buildcache cache-to: type=inline,ref=user/app:buildcache,mode=max \ No newline at end of file From b3924f6d92a6a7469e7d79f3867a5e34f4ded4d4 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Tue, 4 Oct 2022 21:25:35 -0700 Subject: [PATCH 4/5] image name fix --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 98ff6686b..ceb11714f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,7 +45,7 @@ jobs: context: ./frontend platforms: linux/amd64,linux/arm64/v8 push: true - tags: $${{ steps.meta.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=inline,ref=user/app:buildcache cache-to: type=inline,ref=user/app:buildcache,mode=max \ No newline at end of file From 00f94623ee445594c02faa4cca4b6eda4df6ad14 Mon Sep 17 00:00:00 2001 From: Piotr Mankowski Date: Wed, 12 Oct 2022 11:51:07 -0700 Subject: [PATCH 5/5] Include CR app --- distro/pom.xml | 3 +++ frontend/spa-build-config.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/distro/pom.xml b/distro/pom.xml index 66f704791..5720c7e1c 100644 --- a/distro/pom.xml +++ b/distro/pom.xml @@ -47,6 +47,9 @@ 1.10.0 0.2.15 1.0.1 + + + diff --git a/frontend/spa-build-config.json b/frontend/spa-build-config.json index 9ba422d3c..09093926c 100644 --- a/frontend/spa-build-config.json +++ b/frontend/spa-build-config.json @@ -30,7 +30,8 @@ "@openmrs/esm-openconceptlab-app": "next", "@openmrs/esm-dispensing-app": "next", "@openmrs/esm-fast-data-entry-app": "next", - "@openmrs/esm-cohort-builder-app": "next" + "@openmrs/esm-cohort-builder-app": "next", + "@i-tech-uw/esm-client-registry-app": "latest" }, "spaPath": "$SPA_PATH", "apiUrl": "$API_URL",