Add Docker support and CI workflow for build and push
Build and Push Docker Image / build-and-push (push) Successful in 1m25s

Added .dockerignore and Dockerfile for containerization. Introduced GitHub Actions workflow to build and push images to Gitea registry. Updated project file with Docker properties and Azure Containers Tools package. Enhanced launchSettings.json with Docker profile and improved environment settings.
This commit is contained in:
Arne Moerman
2026-05-03 10:34:46 +02:00
parent 294c197d62
commit 795d4606d7
5 changed files with 119 additions and 22 deletions
+36
View File
@@ -0,0 +1,36 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Generate datetime tag
id: vars
run: echo "tag=$(date +'%Y%m%d%H%M')" >> $GITHUB_OUTPUT
- name: Log in to Gitea Registry
uses: docker/login-action@v3
with:
registry: git.arnemoerman.be
username: arne
password: ${{ secrets.PAT_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: ./For Real Consulting
file: ./For Real Consulting/Dockerfile
push: true
tags: |
git.arnemoerman.be/arne/for-real-consulting:latest
git.arnemoerman.be/arne/for-real-consulting:${{ steps.vars.outputs.tag }}