Skip to content

Commit

Permalink
Build webapp image on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
louischan-oursky committed Apr 24, 2024
1 parent cd8d5c7 commit 96805d6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ jobs:
- run: npm run bundle
if: ${{ !cancelled() }}

webapp-image:
runs-on: ubuntu-22.04
needs: test
steps:
- uses: actions/checkout@v3
- run: make build-image
- uses: docker/login-action@v2
if: ${{ github.repository == 'authgear/authgear-sdk-js' && github.event_name == 'push' }}
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- run: make push-image

# react_native_ios cannot be built on simulator due to WeChat SDK

test_react_native_android:
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,12 @@ docs:
deploy-docs: docs
./scripts/deploy_docs.sh

# NOTE(louis): For some unknown reason, if platfrom is set to linux/x86_64,
# The npm run build will get stuck forever on my Apple Silicon MacBook.
# So we have to build it on CI.
.PHONY: build-image
build-image:
docker build --platform linux/x86-64 --tag $(IMAGE) --file ./example/reactweb/Dockerfile .
docker build --tag $(IMAGE) --file ./example/reactweb/Dockerfile .

.PHONY: push-image
push-image:
Expand Down

0 comments on commit 96805d6

Please sign in to comment.