-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |