Skip to content

Commit

Permalink
split base
Browse files Browse the repository at this point in the history
  • Loading branch information
APN-Pucky committed Dec 12, 2024
1 parent 77e4f78 commit 01cd92b
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/gentoo-base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: gentoo-base Docker Image CI


on:
push:
branches: [ "master" ]
paths:
- gentoo/base/Dockerfile
- .github/workflows/gentoo-base.yml
schedule:
- cron: 0 6 1 * *

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true


jobs:
docker:
runs-on: ubuntu-latest
#runs-on: self-hosted
timeout-minutes: 43200 # 720h
strategy:
fail-fast: false
max-parallel: 1
matrix:
user: ["apnpucky"]
base: ["gentoo"]
image: [
"base",
]
platforms: [
"linux/amd64,linux/arm/v7,linux/arm64,linux/riscv64"
#,linux/ppc64le, #,linux/s390x,
]
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Get current time
uses: josStorer/get-current-time@v2.0.2
id: current-time
with:
format: YYYYMMDDHHSS
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
config: .github/buildkitd.toml
-
name: Login to Docker Hub
uses: docker/#-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: ${{ matrix.base }}-${{ matrix.image }}
uses: docker/build-push-action@v3
with:
file: gentoo/base/Dockerfile
platforms: ${{ matrix.platforms }}
push: true
target: ${{ matrix.base }}-${{ matrix.image }}
tags: |
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:latest
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ github.sha }}-latest
${{ matrix.user }}/${{ matrix.base }}-${{ matrix.image }}:${{ steps.current-time.outputs.formattedTime }}-latest
14 changes: 14 additions & 0 deletions gentoo/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM gentoo/portage:latest as portage-base
FROM gentoo/stage3:latest as gentoo-base
LABEL maintainer="APN-Pucky"
ARG NICENESS=14
COPY --from=portage-base /var/db/repos/gentoo /var/db/repos/gentoo
RUN mkdir -p /etc/portage/repos.conf/ && cp /usr/share/portage/config/repos.conf /etc/portage/repos.conf/gentoo.conf
RUN echo "PORTAGE_NICENESS=\"${NICENESS}\"" >> /etc/portage/make.conf
RUN echo "FEATURES=\"${FEATURES} getbinpkg\"" >> /etc/portage/make.conf
#RUN printf "" > /etc/portage/binrepos.conf/gentoobinhost.conf
RUN printf "[amd64gentoobinhost]\npriority=9999\nsync-uri=https://ftp.uni-stuttgart.de/gentoo-distfiles/releases/amd64/binpackages/23.0/x86-64/\n" > /etc/portage/binrepos.conf/amd64gentoobinhost.conf
RUN printf "[arm64gentoobinhost]\npriority=9999\nsync-uri=https://ftp.uni-stuttgart.de/gentoo-distfiles/releases/arm64/binpackages/23.0/arm64/\n" > /etc/portage/binrepos.conf/arm64gentoobinhost.conf
RUN printf "[armgentoobinhost]\npriority=9999\nsync-uri=https://ftp.uni-stuttgart.de/gentoo-distfiles/releases/arm/binpackages/23.0/armv7a_hf/\n" > /etc/portage/binrepos.conf/armgentoobinhost.conf
RUN printf "[riscvgentoobinhost]\npriority=9999\nsync-uri=https://ftp.uni-stuttgart.de/gentoo-distfiles/releases/riscv/binpackages/23.0/rv64_lp64d/\n" > /etc/portage/binrepos.conf/riscvgentoobinhost.conf
RUN mv /etc/portage/gnupg /etc/portage/gnupg.bak ; getuto

0 comments on commit 01cd92b

Please # to comment.