feat: Adds CI/CD steps to build and push web container

This commit is contained in:
Vincent Mahnke 2025-10-11 21:47:23 +02:00 committed by Vincent Mahnke
commit 93f4ce6145

View file

@ -0,0 +1,37 @@
name: Build Hello World Image
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Container Registry
uses: docker/login-action@v3
with:
registry: git.hamburg.ccc.de
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push web image to Container Registry
run: |
docker build -t web:latest .
docker tag web:latest git.hamburg.ccc.de/ccchh/sunders/web:latest
docker push git.hamburg.ccc.de/ccchh/sunders/web:latest
working-directory: ./
- name: Start Docker Compose services
run: |
docker compose up -d --wait
docker compose down
working-directory: /