Some checks failed
Build and Push Docker Image / Build & push to Gitea registry (push) Has been cancelled
- .gitea/workflows/docker.yml: builds and pushes image to devops.cloudhost.es/malin/paste.es on every push to main, tags as :latest and :<short-sha>, uses GHA layer cache - docker-compose.yml: updated to pull pre-built image from Gitea container registry instead of building locally - docker-compose.build.yml: new override file for local dev builds (docker compose -f docker-compose.yml -f docker-compose.build.yml up --build) - docker-compose.runner.yml: act_runner service — mount docker socket, auto-registers with RUNNER_REGISTRATION_TOKEN from .env - .env.example: added RUNNER_REGISTRATION_TOKEN section - README.md: document CI/CD setup, runner registration, and updated quick-start to use registry pull workflow Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
name: Build and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build & push to Gitea registry
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Gitea Container Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: devops.cloudhost.es
|
|
username: ${{ gitea.actor }}
|
|
password: ${{ secrets.GITEA_TOKEN }}
|
|
|
|
- name: Extract image metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: devops.cloudhost.es/malin/paste.es
|
|
tags: |
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
type=sha,prefix=,format=short
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|