Skip to content

♻️ use ducktors as the team #29

♻️ use ducktors as the team

♻️ use ducktors as the team #29

name: Build and Push Thullo Images
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- develop
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build-push-frontend:
name: Build and Push Thullo Frontend
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
with:
version: 8.15.9
- name: Use Node.js version 20.x
uses: actions/setup-node@v2
with:
node-version: 20.x
cache: 'pnpm'
- name: Build front with node
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ducktors
TURBO_API: https://thullo-turbo-remote-cache-docker.fkiss.me
run: |
FORCE_COLOR=true pnpm install --frozen-lockfile
FORCE_COLOR=true TURBO_API=$TURBO_API TURBO_TOKEN=$TURBO_TOKEN TURBO_TEAM=$TURBO_TEAM pnpm turbo build --filter @thullo/front
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CONTAINER_REGISTRY_PAT }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.front
push: true
platforms: linux/amd64,linux/arm64
tags: ghcr.io/fredkiss3/thullo-front:latest,ghcr.io/fredkiss3/thullo-front:${{ github.sha }}
cache-from: type=registry,ref=ghcr.io/fredkiss3/thullo-front:latest
cache-to: type=inline
build-push-backend:
name: Build and Push Thullo API
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CONTAINER_REGISTRY_PAT }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.api
push: true
platforms: linux/amd64,linux/arm64
tags: ghcr.io/fredkiss3/thullo-api:latest,ghcr.io/fredkiss3/thullo-api:${{ github.sha }}
cache-from: |
type=registry,ref=ghcr.io/fredkiss3/thullo-api:latest
cache-to: type=inline
build-args: '--build-arg TURBO_TOKEN="${{ secrets.TURBO_TOKEN }}"'