init
Some checks failed
Build and Push Docker Image (Simple) / build (push) Failing after 15s

This commit is contained in:
Grzegorz Matoga
2025-07-24 18:12:48 +02:00
parent 295a25646d
commit 07596d15e1
3 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
name: Build and Push Docker Image (Simple)
on:
push:
branches: [ main ]
jobs:
build:
runs-on: runner
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build and push
run: |
# Login to Gitea registry
echo "${{ secrets.GITEATOKEN }}" | docker login ${{ gitea.server_url }} -u ${{ gitea.actor }} --password-stdin
# Build the image
docker build -t ${{ gitea.server_url }}/${{ gitea.repository_owner }}/hello-gitea:latest .
# Push to registry
docker push ${{ gitea.server_url }}/${{ gitea.repository_owner }}/hello-gitea:latest

5
Dockerfile Normal file
View File

@@ -0,0 +1,5 @@
FROM python:3.14-slim
WORKDIR /app
COPY hello.py .
RUN chmod +x hello.py
CMD ["python", "hello.py"]

3
hello.py Normal file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env python3
print("Hello from a Gitea hosted Docker repo built on the runner! 🚀")
print("This image was built using Gitea Actions and stored in Gitea's registry.")