Some checks failed
Build and Push Backend / build (push) Failing after 2m34s
- Multi-stage Dockerfile with Bun 1.3.6 - Gitea Actions workflow for auto-build - Push to git.fuq.tv container registry - Build cache optimization Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
name: Build and Push Backend
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
tags:
|
|
- 'v*'
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Extract metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: git.fuq.tv/admin/aiworker-backend
|
|
tags: |
|
|
type=ref,event=branch
|
|
type=ref,event=pr
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=sha,prefix={{branch}}-
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
|
|
- name: Login to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.fuq.tv
|
|
username: admin
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=registry,ref=git.fuq.tv/admin/aiworker-backend:buildcache
|
|
cache-to: type=registry,ref=git.fuq.tv/admin/aiworker-backend:buildcache,mode=max
|
|
|
|
- name: Image digest
|
|
run: echo ${{ steps.meta.outputs.tags }}
|