Skip to content

Commit

Permalink
Merge pull request #1 from I-TECH-UW/pmanko-patch-build-image
Browse files Browse the repository at this point in the history
Adding support for publishing frontend image
  • Loading branch information
pmanko authored Oct 12, 2022
2 parents f24b87b + 00f9462 commit e375726
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -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 }}-frontend

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: ${{ 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
3 changes: 3 additions & 0 deletions distro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
<htmlwidgets.version>1.10.0</htmlwidgets.version>
<serialization-xstream.version>0.2.15</serialization-xstream.version>
<ordertemplates.version>1.0.1</ordertemplates.version>
<!-- HIE Support -->
<facilityregistry.version></facilityregistry.version>
<clientregistry
</properties>

<dependencies>
Expand Down
3 changes: 2 additions & 1 deletion frontend/spa-build-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit e375726

Please sign in to comment.