Add CI/CD workflow + Dockerfile
Some checks failed
Docker Build & Push / build (push) Has been cancelled
Some checks failed
Docker Build & Push / build (push) Has been cancelled
This commit is contained in:
25
.gitea/workflows/docker-build.yml
Normal file
25
.gitea/workflows/docker-build.yml
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: Docker Build & Push
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: linux
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Login to Gitea Container Registry
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.kgessner.de
|
||||||
|
username: ${{ gitea.actor }}
|
||||||
|
password: ${{ secrets.GITEA_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: git.kgessner.de/luiicode/test-image:latest
|
||||||
4
Dockerfile
Normal file
4
Dockerfile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
LABEL org.opencontainers.image.source="https://git.kgessner.de/LuiiCode/test-repo"
|
||||||
|
RUN echo "Hello from Gitea CI/CD" > /message.txt
|
||||||
|
CMD ["cat", "/message.txt"]
|
||||||
Reference in New Issue
Block a user