All checks were successful
Build & Push / build-and-push (push) Successful in 6m14s
CI only builds the Docker image and pushes to Gitea registry. Server deployment is manual via docker compose pull + up. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
name: Build & Push
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
env:
|
|
REGISTRY: code.letsbe.solutions
|
|
IMAGE: letsbe/letsbebiz-site
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Login to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
${{ env.REGISTRY }}/${{ env.IMAGE }}:latest
|
|
${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ github.sha }}
|
|
build-args: |
|
|
DATABASE_URI=postgresql://build:build@localhost:5432/build
|
|
PAYLOAD_SECRET=${{ secrets.PAYLOAD_SECRET }}
|
|
NEXT_PUBLIC_SITE_URL=${{ secrets.NEXT_PUBLIC_SITE_URL }}
|
|
NEXT_PUBLIC_CALCOM_URL=${{ secrets.NEXT_PUBLIC_CALCOM_URL }}
|
|
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE }}:buildcache
|
|
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE }}:buildcache,mode=max
|