Skip to content

Commit

Permalink
💚 Split Frontend CI Build Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachid F committed May 5, 2024
1 parent 3df331c commit 3fffa60
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build and push Frontend (Magic Links)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
context: .
file: ./apps/magic-link/Dockerfile
push: false
tags: panoradotdev/frontend-magic-links:selfhosted
build-args: |
VITE_BACKEND_DOMAIN=${{ secrets.VITE_BACKEND_DOMAIN }}
- name: Build and push Frontend (Dashboard)
- name: Build Frontend (Dashboard)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/docker.check-build.magiclinks.selfhosted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Compile Docker Images (Frontend Selfhosted)

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
env:
ENVIRONMENT: SELF_HOSTED

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build Frontend (Magic Links)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
context: .
file: ./apps/magic-link/Dockerfile
push: false
tags: panoradotdev/frontend-magic-links:selfhosted
build-args: |
VITE_BACKEND_DOMAIN=${{ secrets.VITE_BACKEND_DOMAIN }}
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Frontend (Magic Links)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
context: .
file: ./apps/magic-link/Dockerfile
push: true
tags: panoradotdev/frontend-magic-links:selfhosted
build-args: |
VITE_BACKEND_DOMAIN=${{ secrets.VITE_BACKEND_DOMAIN }}
- name: Build and push Frontend (Dashboard)
uses: docker/build-push-action@v2
with:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/docker.export.frontend-magiclinks.selfhosted.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Export Docker Images (Frontend Selfhosted)

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
env:
ENVIRONMENT: SELF_HOSTED

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push Frontend (Magic Links)
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
context: .
file: ./apps/magic-link/Dockerfile
push: true
tags: panoradotdev/frontend-magic-links:selfhosted
build-args: |
VITE_BACKEND_DOMAIN=${{ secrets.VITE_BACKEND_DOMAIN }}
1 change: 0 additions & 1 deletion packages/api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ RUN pnpm add -g turbo
COPY . .
RUN turbo prune api --docker

# resulat: full/, json/ pnpm-lock.yaml , pnpm-workspace.yaml
# =======================================================================
# Add lockfile and package.json's of isolated subworkspace
FROM base AS installer
Expand Down

0 comments on commit 3fffa60

Please sign in to comment.