Compare commits

..

21 Commits

Author SHA1 Message Date
jafreli
5c958d6c6d Update worckflow
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 2m13s
2025-07-24 22:32:56 +02:00
jafreli
4279e21316 Update worckflow
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 2m13s
2025-07-24 22:04:32 +02:00
jafreli
e7345aee30 Update worckflow
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 2m12s
2025-07-24 21:55:16 +02:00
jafreli
fbebb084d0 Update worckflow
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 2m12s
2025-07-24 21:51:25 +02:00
jafreli
cdb52cac56 Update worckflow
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 4m30s
2025-07-24 21:43:37 +02:00
jafreli
727a9f9b9b Update worckflow
All checks were successful
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 14s
2025-07-19 01:38:26 +02:00
jafreli
1871bb8d1f Update worckflow
All checks were successful
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 25s
2025-07-19 01:36:13 +02:00
jafreli
9476f1bde2 Update worckflow
All checks were successful
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 19s
2025-07-19 01:34:17 +02:00
jafreli
25c42c728c Update worckflow
Some checks failed
Build and Push Docker Image (Simple) / build-and-push (push) Failing after 44s
2025-07-19 01:32:03 +02:00
jafreli
bd4e35cc02 Update worckflow 2025-07-19 01:31:15 +02:00
jafreli
f69eed06eb Update worckflow
All checks were successful
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 9s
2025-07-19 01:28:56 +02:00
jafreli
7bea1f9635 Update worckflow
All checks were successful
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 4s
2025-07-19 01:27:21 +02:00
jafreli
2093695c90 Update worckflow
Some checks failed
Build and Push Docker Image (Simple) / build-and-push (push) Failing after 4s
2025-07-19 01:25:18 +02:00
jafreli
4afb4e4d0c Update worckflow
All checks were successful
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 4s
2025-07-19 01:17:22 +02:00
jafreli
ff0d234eb3 Update worckflow
All checks were successful
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 4s
2025-07-19 01:15:03 +02:00
jafreli
db4edc6fa3 Update worckflow
All checks were successful
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 4s
2025-07-19 01:13:05 +02:00
jafreli
b7a989de99 Update worckflow
All checks were successful
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 5s
2025-07-19 01:11:16 +02:00
jafreli
254a76bd97 Update worckflow
All checks were successful
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 15s
2025-07-19 01:08:40 +02:00
jafreli
7c76144a0e Update worckflow
Some checks failed
Build and Push Docker Image (Simple) / build-and-push (push) Failing after 4s
2025-07-19 01:08:05 +02:00
jafreli
b857a18457 Update worckflow
Some checks failed
Build and Push Docker Image (Simple) / build-and-push (push) Failing after 3s
2025-07-19 01:04:33 +02:00
jafreli
72da152f93 Update worckflow
Some checks failed
Build and Push Docker Image (Simple) / build-and-push (push) Successful in 31s
Build and Push Docker Image / build-and-push (push) Failing after 3m18s
2025-07-19 00:57:14 +02:00
2 changed files with 29 additions and 19 deletions

View File

@@ -11,10 +11,12 @@ on:
branches:
- main
- master
release:
types: [published]
env:
REGISTRY: git.out.jafre.li # Ersetze mit deiner Gitea-Domain
IMAGE_NAME: habit-tracker
REGISTRY: git.out.jafre.li
IMAGE_NAME: ${{ gitea.repository }}
jobs:
build-and-push:
@@ -30,24 +32,33 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.GITEA_TOKEN }}
password: ${{ secrets.TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ gitea.repository_owner }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}
labels: |
org.opencontainers.image.title=${{ gitea.repository }}
org.opencontainers.image.description=Habit Tracker Application
org.opencontainers.image.url=${{ gitea.server_url }}/${{ gitea.repository }}
org.opencontainers.image.source=${{ gitea.server_url }}/${{ gitea.repository }}
org.opencontainers.image.version=${{ gitea.ref_name }}
org.opencontainers.image.created=${{ gitea.run_started_at }}
org.opencontainers.image.revision=${{ gitea.sha }}
org.opencontainers.image.licenses=MIT
- name: Build and push Docker image
uses: docker/build-push-action@v5
@@ -57,20 +68,12 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
SOURCE_URL=${{ gitea.server_url }}/${{ gitea.repository }}
REPO_NAME=${{ gitea.repository }}
- name: Generate deployment info
run: |
echo "## Docker Image Built Successfully! 🐳" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Image:** \`${{ env.REGISTRY }}/${{ gitea.repository_owner }}/${{ env.IMAGE_NAME }}:latest\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### Quick Start:" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
echo "docker run -d \\" >> $GITHUB_STEP_SUMMARY
echo " --name habit-tracker \\" >> $GITHUB_STEP_SUMMARY
echo " -p 5000:5000 \\" >> $GITHUB_STEP_SUMMARY
echo " -v habit-data:/app/data \\" >> $GITHUB_STEP_SUMMARY
echo " ${{ env.REGISTRY }}/${{ gitea.repository_owner }}/${{ env.IMAGE_NAME }}:latest" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "Docker image pushed successfully!"
echo "Image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
echo "Tags: ${{ steps.meta.outputs.tags }}"

View File

@@ -1,6 +1,13 @@
# Use Python 3.11 slim image
FROM python:3.11-slim
# Add labels for Gitea package linking (will be set during build)
ARG SOURCE_URL
ARG REPO_NAME
LABEL org.opencontainers.image.source="${SOURCE_URL}"
LABEL org.opencontainers.image.description="Habit Tracker Application"
LABEL org.opencontainers.image.licenses="MIT"
# Set working directory
WORKDIR /app