-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
553 additions
and
389 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,49 +20,43 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- name: Setup kernel for react native, increase watchers | ||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20.13.1' | ||
|
||
- name: Start MongoDB | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: 4.2.8 | ||
|
||
- name: Cache pnpm modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}- | ||
- uses: pnpm/[email protected] | ||
env: | ||
CI: false | ||
with: | ||
version: 8.9.0 | ||
run_install: true | ||
|
||
- name: Build, tag, and push image to Github Container Registry | ||
id: build-image | ||
|
||
- name: Build & Tag Docker image | ||
env: | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/api | ||
IMAGE_TAG: ${{ github.sha }} | ||
GH_ACTOR: implerhq | ||
GH_PASSWORD: ${{ secrets.GH_PACKAGES }} | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: | | ||
echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin | ||
docker build -t ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG -f apps/api/Dockerfile . | ||
docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
# docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod | ||
docker run --network=host --name api -dit --env NODE_ENV=test --env JWT_SECRET=impler --env COOKIE_DOMAIN=impler ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG | ||
docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:3000/v1/health-check | grep 'ok' | ||
- name: Run Docker container | ||
env: | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/api | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: docker run --network=host --name api -dit --env NODE_ENV=test --env JWT_SECRET=impler --env COOKIE_DOMAIN=impler ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG | ||
|
||
- name: Check application health | ||
run: docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:3000/v1/health-check | grep 'ok' | ||
|
||
# docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod | ||
- name: Log in to GitHub Container Registry | ||
env: | ||
GH_ACTOR: implerhq | ||
GH_PASSWORD: ${{ secrets.GH_PACKAGES }} | ||
run: echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin | ||
|
||
- name: Push Docker image | ||
env: | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/api | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: | | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
# docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG | ||
# echo "::set-output name=IMAGE::ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG" | ||
echo "::set-output name=IMAGE::ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,45 +20,48 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- name: Setup kernel for react native, increase watchers | ||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20.13.1' | ||
|
||
- name: Cache pnpm modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}- | ||
- uses: pnpm/[email protected] | ||
env: | ||
CI: false | ||
with: | ||
version: 8.9.0 | ||
run_install: true | ||
|
||
- name: Build | ||
run: pnpm run --filter @impler/embed build:prod | ||
|
||
- name: Build, tag, and push image to Github Container Registry | ||
id: build-image | ||
- name: Build & Tag Docker image | ||
env: | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/embed | ||
IMAGE_TAG: ${{ github.sha }} | ||
GH_ACTOR: implerhq | ||
GH_PASSWORD: ${{ secrets.GH_PACKAGES }} | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: | | ||
echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin | ||
docker build -t ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG -f libs/embed/Dockerfile . | ||
docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod | ||
- name: Run Docker container | ||
env: | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/embed | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: docker run --network=host -dit ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG | ||
|
||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
- name: Check application health | ||
run: | | ||
for i in {1..5}; do | ||
if curl --output /dev/null --silent --head --fail http://localhost:4701/embed.umd.min.js; then | ||
exit 0 | ||
fi | ||
echo "Waiting for the application to start..." | ||
sleep 5 | ||
done | ||
echo "Application failed to start" | ||
exit 1 | ||
- name: Log in to GitHub Container Registry | ||
env: | ||
GH_ACTOR: implerhq | ||
GH_PASSWORD: ${{ secrets.GH_PACKAGES }} | ||
run: echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin | ||
|
||
- name: Push Docker image | ||
env: | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/embed | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: | | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
echo "::set-output name=IMAGE::ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG" | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,41 +20,28 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- name: Setup kernel for react native, increase watchers | ||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20.13.1' | ||
|
||
- name: Cache pnpm modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}- | ||
|
||
- uses: pnpm/[email protected] | ||
env: | ||
CI: false | ||
with: | ||
version: 8.9.0 | ||
run_install: true | ||
|
||
- name: Build, tag, and push image to Github Container Registry | ||
id: build-image | ||
- name: Build & Tag Docker image | ||
env: | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/queue-manager | ||
IMAGE_TAG: ${{ github.sha }} | ||
GH_ACTOR: implerhq | ||
GH_PASSWORD: ${{ secrets.GH_PACKAGES }} | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: | | ||
echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin | ||
docker build -t ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG -f apps/queue-manager/Dockerfile . | ||
docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
- name: Log in to GitHub Container Registry | ||
env: | ||
GH_ACTOR: implerhq | ||
GH_PASSWORD: ${{ secrets.GH_PACKAGES }} | ||
run: echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin | ||
|
||
- name: Push Docker image | ||
env: | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/queue-manager | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: | | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
echo "::set-output name=IMAGE::ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,39 +21,46 @@ jobs: | |
- name: Setup kernel for react native, increase watchers | ||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20.13.1' | ||
|
||
- name: Cache pnpm modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}- | ||
- uses: pnpm/[email protected] | ||
- name: Build & Tag Docker image | ||
env: | ||
CI: false | ||
with: | ||
version: 8.9.0 | ||
run_install: true | ||
|
||
- name: Build, tag, and push image to Github container registry | ||
id: build-image | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/web | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: | | ||
docker build -t ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG -f apps/web/Dockerfile . | ||
docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
- name: Run Docker container | ||
env: | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/web | ||
IMAGE_TAG: ${{ github.sha }} | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: docker run --network=host -dit ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG | ||
|
||
- name: Check application health | ||
run: | | ||
for i in {1..5}; do | ||
if curl --output /dev/null --silent --head --fail http://localhost:4200; then | ||
exit 0 | ||
fi | ||
echo "Waiting for the application to start..." | ||
sleep 5 | ||
done | ||
echo "Application failed to start" | ||
exit 1 | ||
- name: Log in to GitHub Container Registry | ||
env: | ||
GH_ACTOR: implerhq | ||
GH_PASSWORD: ${{ secrets.GH_PACKAGES }} | ||
run: echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin | ||
|
||
- name: Push Docker image | ||
env: | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/web | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: | | ||
echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin | ||
docker build -t ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG -f apps/web/Dockerfile . | ||
docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod | ||
docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG | ||
echo "::set-output name=IMAGE::ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,44 +20,51 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- name: Setup kernel for react native, increase watchers | ||
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '20.13.1' | ||
|
||
- name: Cache pnpm modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.pnpm-store | ||
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}- | ||
- uses: pnpm/[email protected] | ||
env: | ||
CI: false | ||
with: | ||
version: 8.9.0 | ||
run_install: true | ||
|
||
- name: Envsetup | ||
- name: Envsetup | ||
working-directory: apps/widget | ||
run: npm run envsetup | ||
|
||
- name: Build & Tag Docker image | ||
env: | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/widget | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: | | ||
docker build -t ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG -f apps/widget/Dockerfile . | ||
docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
- name: Build, tag, and push image to Github container registry | ||
id: build-image | ||
- name: Run Docker container | ||
env: | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/widget | ||
IMAGE_TAG: ${{ github.sha }} | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: docker run --network=host -dit ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG | ||
|
||
- name: Check application health | ||
run: | | ||
for i in {1..5}; do | ||
if curl --output /dev/null --silent --head --fail http://localhost:3500; then | ||
exit 0 | ||
fi | ||
echo "Waiting for the application to start..." | ||
sleep 5 | ||
done | ||
echo "Application failed to start" | ||
exit 1 | ||
- name: Log in to GitHub Container Registry | ||
env: | ||
GH_ACTOR: implerhq | ||
GH_PASSWORD: ${{ secrets.GH_PACKAGES }} | ||
run: echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin | ||
|
||
- name: Push Docker image | ||
env: | ||
REGISTERY_OWNER: implerhq | ||
DOCKER_NAME: impler/widget | ||
IMAGE_TAG: ${{ github.event.pull_request.head.sha || github.sha }} | ||
run: | | ||
echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin | ||
docker build -t ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG -f apps/widget/Dockerfile . | ||
docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod | ||
docker tag ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:prod | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG | ||
docker push ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:latest | ||
echo "::set-output name=IMAGE::ghcr.io/$REGISTERY_OWNER/$DOCKER_NAME:$IMAGE_TAG" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- next | ||
workflow_dispatch | ||
# push: | ||
# branches: | ||
# - next | ||
|
||
jobs: | ||
build: | ||
|
Oops, something went wrong.