mirror of https://github.com/Nonannet/copapy.git
container image script added
This commit is contained in:
parent
1cf1d2e43e
commit
b517390bf8
|
|
@ -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
|
||||
|
|
@ -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
|
||||
Loading…
Reference in New Issue