matrix-bot/.gitea/workflows/docker.yml
shinya 2e6e55f5b3
Some checks failed
Docker Build / build (push) Successful in 9m0s
Deploy Matrix Bot / deploy (push) Failing after 1m33s
fix ai
2026-05-04 17:26:21 +02:00

47 lines
1.4 KiB
YAML

name: Docker Build
on:
push:
branches: ["main"]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea registry
if: ${{ secrets.REGISTRY_USERNAME != '' && secrets.REGISTRY_PASSWORD != '' }}
uses: docker/login-action@v3
with:
registry: git.kogami.xyz
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build image (with registry cache)
if: ${{ secrets.REGISTRY_USERNAME != '' && secrets.REGISTRY_PASSWORD != '' }}
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: false
load: true
tags: matrix-bot:latest
cache-from: type=registry,ref=git.kogami.xyz/foglar/matrix-bot:buildcache
cache-to: type=registry,ref=git.kogami.xyz/foglar/matrix-bot:buildcache,mode=max
- name: Build image (no registry cache)
if: ${{ secrets.REGISTRY_USERNAME == '' || secrets.REGISTRY_PASSWORD == '' }}
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: false
load: true
tags: matrix-bot:latest