mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2025-12-31 06:39:35 -06:00
143 lines
4.4 KiB
YAML
143 lines
4.4 KiB
YAML
name: Deploy images
|
|
|
|
on:
|
|
push:
|
|
branches: ["master"]
|
|
workflow_dispatch:
|
|
jobs:
|
|
docker-build-and-push-client:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Get version
|
|
id: vars
|
|
run: echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
|
- name: Build Client Docker image
|
|
run: |
|
|
docker build \
|
|
-t ghcr.io/bluewave-labs/checkmate-client:latest \
|
|
-f ./docker/dist/client.Dockerfile \
|
|
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
|
|
--build-arg VITE_APP_VERSION=${{ env.VERSION }} \
|
|
.
|
|
|
|
- name: Push Client Docker image
|
|
run: |
|
|
docker push ghcr.io/bluewave-labs/checkmate-client:latest
|
|
|
|
docker-build-and-push-server:
|
|
needs: docker-build-and-push-client
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build Server Docker image
|
|
run: |
|
|
docker build \
|
|
-t ghcr.io/bluewave-labs/checkmate-backend:latest \
|
|
-f ./docker/dist/server.Dockerfile \
|
|
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
|
|
.
|
|
|
|
- name: Push Server Docker image
|
|
run: |
|
|
docker push ghcr.io/bluewave-labs/checkmate-backend:latest
|
|
|
|
- name: Build Mongo Docker image
|
|
run: |
|
|
docker build \
|
|
-t ghcr.io/bluewave-labs/checkmate-mongo:latest \
|
|
-f ./docker/dist/mongoDB.Dockerfile \
|
|
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
|
|
.
|
|
|
|
- name: Push MongoDB Docker image
|
|
run: |
|
|
docker push ghcr.io/bluewave-labs/checkmate-mongo:latest
|
|
|
|
docker-build-and-push-server-mono-multiarch:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Get version
|
|
id: vars
|
|
run: echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
|
|
|
- name: Build and push multi-arch Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: ./docker/dist-arm/server.Dockerfile
|
|
push: true
|
|
tags: |
|
|
ghcr.io/bluewave-labs/checkmate-backend-mono-multiarch:latest
|
|
platforms: linux/amd64,linux/arm64
|
|
labels: |
|
|
org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate
|
|
build-args: |
|
|
VITE_APP_VERSION=${{ env.VERSION }}
|
|
|
|
docker-build-and-push-server-mono:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Log in to GitHub Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Get version
|
|
id: vars
|
|
run: echo "VERSION=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
|
|
|
|
- name: Build Server Docker image
|
|
run: |
|
|
docker build \
|
|
-t ghcr.io/bluewave-labs/checkmate-backend-mono:latest \
|
|
-f ./docker/dist-mono/server.Dockerfile \
|
|
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
|
|
--build-arg VITE_APP_VERSION=${{ env.VERSION }} \
|
|
.
|
|
|
|
- name: Push Server Docker image
|
|
run: docker push ghcr.io/bluewave-labs/checkmate-backend-mono:latest
|