Skip to content

Development

Development #25

Workflow file for this run

name: CI/CD Build Pipeline # The name of the workflow
on:
pull_request:
branches:
- "*"
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
build:
name: "Build Application"
runs-on: ubuntu-latest
steps:
- name: "Checkout repository"
uses: actions/checkout@v4
- name: "Set up QEMU"
uses: docker/setup-qemu-action@v3
- name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v3
- name: "Login to GitHub Container Registry"
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: "Build Server"
if: contains(github.event.pull_request.labels.*.name, 'backend')
uses: docker/build-push-action@v4
with:
target: runner
file: ./apps/server/Dockerfile
push: true
tags: |
ghcr.io/dmytro-komlyk/prod-fixlab-server:latest
- name: "Build Client"
if: contains(github.event.pull_request.labels.*.name, 'frontend-client')
uses: docker/build-push-action@v4
with:
target: runner
file: ./apps/client/Dockerfile
push: true
tags: |
ghcr.io/dmytro-komlyk/prod-fixlab-client:latest
build-args: |
DATABASE_URL=${{ secrets.DATABASE_URL }}
TWANK_PROPERTY_ID=${{ secrets.TWANK_PROPERTY_ID }}
TWANK_WIDGET_ID=${{ secrets.TWANK_WIDGET_ID }}
- name: "Build Admin"
if: contains(github.event.pull_request.labels.*.name, 'frontend-admin')
uses: docker/build-push-action@v4
with:
target: runner
file: ./apps/admin/Dockerfile
push: true
tags: |
ghcr.io/dmytro-komlyk/prod-fixlab-admin:latest
build-args: |
DATABASE_URL=${{ secrets.DATABASE_URL }}