Optimize: Migrate mischlabs fully to Gitea Local Package Registry
All checks were successful
Build & Push Docker Image to Gitea Registry / build-and-push (push) Successful in 13s

This commit is contained in:
Kroonk
2026-05-20 16:43:54 +02:00
parent bf404e34c3
commit c0680700a3
2 changed files with 17 additions and 13 deletions

View File

@@ -1,12 +1,12 @@
name: Build & Push Docker Image to GHCR name: Build & Push Docker Image to Gitea Registry
on: on:
push: push:
branches: [master] branches: [master]
env: env:
REGISTRY: ghcr.io REGISTRY: git.mischlabs.de
IMAGE_NAME: kroonk/mischlabs REGISTRY_IMAGE: git.mischlabs.de/mrdiderot/mischlabs
jobs: jobs:
build-and-push: build-and-push:
@@ -40,16 +40,20 @@ jobs:
fi fi
docker --version docker --version
- name: Log in to GitHub Container Registry - name: Log in to Gitea Package Registry
uses: docker/login-action@v3 shell: sh
with: run: |
registry: ${{ env.REGISTRY }} if [ -z "${{ secrets.REGISTRY_USER }}" ] || [ -z "${{ secrets.REGISTRY_TOKEN }}" ]; then
username: ${{ secrets.GHCR_USERNAME }} echo "Missing registry credentials."
password: ${{ secrets.GHCR_TOKEN }} echo "Create repository secrets REGISTRY_USER and REGISTRY_TOKEN."
echo "REGISTRY_TOKEN must be a Gitea access token with package write permission."
exit 1
fi
echo "${{ secrets.REGISTRY_TOKEN }}" | docker login "${{ env.REGISTRY }}" -u "${{ secrets.REGISTRY_USER }}" --password-stdin
- name: Build and push Docker image - name: Build and push Docker image
shell: sh shell: sh
run: | run: |
docker build -t ghcr.io/kroonk/mischlabs:latest -t ghcr.io/kroonk/mischlabs:${{ github.sha }} . docker build -t ${{ env.REGISTRY_IMAGE }}:latest -t ${{ env.REGISTRY_IMAGE }}:${{ github.sha }} .
docker push ghcr.io/kroonk/mischlabs:latest docker push ${{ env.REGISTRY_IMAGE }}:latest
docker push ghcr.io/kroonk/mischlabs:${{ github.sha }} docker push ${{ env.REGISTRY_IMAGE }}:${{ github.sha }}

View File

@@ -1,6 +1,6 @@
services: services:
mischlabs: mischlabs:
image: ghcr.io/kroonk/mischlabs:latest image: git.mischlabs.de/mrdiderot/mischlabs:latest
container_name: mischlabs container_name: mischlabs
restart: unless-stopped restart: unless-stopped
ports: ports: