add the build workflow
Some checks failed
Build Container Image / build (push) Failing after 42s

This commit is contained in:
Tobias Brunner 2025-03-06 10:38:07 +01:00
parent ac75e964cb
commit 107b9d8652
No known key found for this signature in database

View file

@ -0,0 +1,35 @@
name: Build Container Image
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ vars.CONTAINER_REGISTRY }}
username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }}
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ vars.CONTAINER_REGISTRY }}/${{ vars.CONTAINER_IMAGE_NAME }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max