container image script added

This commit is contained in:
Nicolas Kruse 2025-10-08 23:20:57 +02:00
parent 1cf1d2e43e
commit b517390bf8
2 changed files with 50 additions and 0 deletions

37
.github/workflows/build_images.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Build & Push Images
on:
push:
branches: [main]
path: [.github/workflows, tools/build_container]
workflow_dispatch:
permissions:
packages: write
contents: read
jobs:
docker-build:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set image name
run: echo "IMAGE_NAME=ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/cross_compiler_unix:1" >> $GITHUB_ENV
- name: Build Docker image
run: docker build -t $IMAGE_NAME ./tools/build_container/
- name: Push Docker image
run: docker push $IMAGE_NAME

View File

@ -0,0 +1,13 @@
FROM debian:stable
WORKDIR /home
RUN apt-get update && apt-get install -y \
build-essential \
gcc-12 \
gcc-12-arm-linux-gnueabihf \
gcc-12-mips-linux-gnu \
gcc-12-mipsel-linux-gnu \
gcc-12-riscv64-linux-gnu \
gcc-12-aarch64-linux-gnu \
gcc-12-multilib