docker: build locally on NAS, no registry needed

This commit is contained in:
Michess
2026-04-13 13:01:31 +02:00
parent 8a6d7ddffb
commit 81f60c9846
3 changed files with 7 additions and 35 deletions

View File

@@ -1,39 +1,11 @@
name: Build & Push Docker Image
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup
shell: sh
run: apk add --no-cache docker-cli bash git
- name: Checkout
uses: actions/checkout@v4
- name: Login to Gitea Registry
run: |
echo "${{ secrets.REGISTRY_TOKEN }}" | \
docker login localhost:3001 \
-u "${{ secrets.REGISTRY_USER }}" \
--password-stdin
- name: Build Docker Image
run: |
docker build \
--build-arg NEXT_PUBLIC_API_URL="${{ vars.NEXT_PUBLIC_API_URL }}" \
--build-arg NEXT_PUBLIC_APP_URL="${{ vars.NEXT_PUBLIC_APP_URL }}" \
-t localhost:3001/mrdiderot/michess:latest \
.
- name: Push to Registry
run: docker push localhost:3001/mrdiderot/michess:latest
- name: Logout
if: always()
run: docker logout localhost:3001
- name: Info
run: echo "Manueller Build-Trigger. Image wird direkt auf der NAS gebaut."