Add Dockerfile + CI/CD pipeline
This commit is contained in:
27
.gitea/workflows/docker-build.yml
Normal file
27
.gitea/workflows/docker-build.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Docker Build & Push
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: linux
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Docker Login
|
||||
run: |
|
||||
echo "${{ secrets.GITEATOKEN }}" | docker login git.kgessner.de --username keviin --password-stdin
|
||||
|
||||
- name: Build Image
|
||||
run: |
|
||||
docker build -t git.kgessner.de/keviin/logmaster:latest .
|
||||
docker tag git.kgessner.de/keviin/logmaster:latest git.kgessner.de/keviin/logmaster:${GITHUB_SHA::8}
|
||||
|
||||
- name: Push Image
|
||||
run: |
|
||||
docker push git.kgessner.de/keviin/logmaster:latest
|
||||
docker push git.kgessner.de/keviin/logmaster:${GITHUB_SHA::8}
|
||||
Reference in New Issue
Block a user