Skip to content

Commit e5bde78

Browse files
committed
test ix
1 parent 6fb054f commit e5bde78

File tree

4 files changed

+168
-4
lines changed

4 files changed

+168
-4
lines changed

.github/workflows/build_gh_runner_images.yaml

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -839,6 +839,166 @@ jobs:
839839
ghcr.io/pkgforge/devscripts/debian-guix:${{ matrix.arch }}-${{ env.DOCKER_TAG }}
840840
push: true
841841
continue-on-error: true
842+
#------------------------------------------------------------------------------------#
843+
build-push-docker-alpine-ix:
844+
name: Push (alpine-ix) --> Docker Hub
845+
runs-on: ${{ matrix.runner }}
846+
strategy:
847+
matrix:
848+
include:
849+
#- arch: aarch64
850+
# platform: arm64
851+
# runner: ubuntu-24.04-arm
852+
- arch: x86_64
853+
platform: amd64
854+
runner: ubuntu-latest
855+
steps:
856+
- name: Checkout repository
857+
uses: actions/checkout@v4
858+
with:
859+
path: main
860+
filter: "blob:none"
861+
862+
- name: Debloat Runner
863+
run: |
864+
#Presets
865+
set +x ; set +e
866+
#--------------#
867+
bash <(curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Github/Runners/debloat_ubuntu.sh")
868+
continue-on-error: true
869+
870+
- name: Setup Env
871+
run: |
872+
#Presets
873+
set +x ; set +e
874+
#--------------#
875+
#Docker Tags
876+
DOCKER_TAG="v$(date +'%Y.%m.%d')" && export DOCKER_TAG="${DOCKER_TAG}"
877+
echo "DOCKER_TAG=${DOCKER_TAG}" >> "${GITHUB_ENV}"
878+
#Copy dockerfiles
879+
mkdir -p "/tmp/DOCKERFILES" && cd "/tmp/DOCKERFILES"
880+
cp "${GITHUB_WORKSPACE}/main/Github/Runners/alpine-ix.dockerfile" "/tmp/DOCKERFILES/alpine-ix.dockerfile"
881+
continue-on-error: true
882+
883+
- name: Set up QEMU
884+
uses: docker/setup-qemu-action@v3
885+
continue-on-error: true
886+
887+
- name: Set up Docker Buildx
888+
uses: docker/setup-buildx-action@v3
889+
continue-on-error: true
890+
891+
- name: Login to Docker Hub
892+
uses: docker/login-action@v3
893+
with:
894+
username: "${{ secrets.DOCKERHUB_USERNAME }}"
895+
password: "${{ secrets.DOCKERHUB_TOKEN }}"
896+
continue-on-error: true
897+
898+
- name: Login to GHCR
899+
uses: docker/login-action@v3
900+
with:
901+
registry: ghcr.io
902+
username: "${{ github.actor }}"
903+
password: "${{ secrets.GITHUB_TOKEN }}"
904+
continue-on-error: true
905+
906+
#https://hub.docker.com/r/pkgforge/alpine-ix
907+
- name: Docker Build and Push (alpine-ix)
908+
uses: docker/build-push-action@v6
909+
with:
910+
context: /tmp/DOCKERFILES/
911+
file: "/tmp/DOCKERFILES/alpine-ix.dockerfile"
912+
platforms: "linux/${{ matrix.platform }}"
913+
build-args: |
914+
ARCH=${{ matrix.arch }}
915+
tags: |
916+
pkgforge/alpine-ix:${{ matrix.arch }}
917+
pkgforge/alpine-ix:${{ matrix.arch }}-${{ env.DOCKER_TAG }}
918+
ghcr.io/pkgforge/devscripts/alpine-ix:${{ matrix.arch }}
919+
ghcr.io/pkgforge/devscripts/alpine-ix:${{ matrix.arch }}-${{ env.DOCKER_TAG }}
920+
push: true
921+
continue-on-error: true
922+
#------------------------------------------------------------------------------------#
923+
build-push-docker-debian-ix:
924+
name: Push (debian-ix) --> Docker Hub
925+
runs-on: ${{ matrix.runner }}
926+
strategy:
927+
matrix:
928+
include:
929+
#- arch: aarch64
930+
# platform: arm64
931+
# runner: ubuntu-24.04-arm
932+
- arch: x86_64
933+
platform: amd64
934+
runner: ubuntu-latest
935+
steps:
936+
- name: Checkout repository
937+
uses: actions/checkout@v4
938+
with:
939+
path: main
940+
filter: "blob:none"
941+
942+
- name: Debloat Runner
943+
run: |
944+
#Presets
945+
set +x ; set +e
946+
#--------------#
947+
bash <(curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Github/Runners/debloat_ubuntu.sh")
948+
continue-on-error: true
949+
950+
- name: Setup Env
951+
run: |
952+
#Presets
953+
set +x ; set +e
954+
#--------------#
955+
#Docker Tags
956+
DOCKER_TAG="v$(date +'%Y.%m.%d')" && export DOCKER_TAG="${DOCKER_TAG}"
957+
echo "DOCKER_TAG=${DOCKER_TAG}" >> "${GITHUB_ENV}"
958+
#Copy dockerfiles
959+
mkdir -p "/tmp/DOCKERFILES" && cd "/tmp/DOCKERFILES"
960+
cp "${GITHUB_WORKSPACE}/main/Github/Runners/debian-ix.dockerfile" "/tmp/DOCKERFILES/debian-ix.dockerfile"
961+
continue-on-error: true
962+
963+
- name: Set up QEMU
964+
uses: docker/setup-qemu-action@v3
965+
continue-on-error: true
966+
967+
- name: Set up Docker Buildx
968+
uses: docker/setup-buildx-action@v3
969+
continue-on-error: true
970+
971+
- name: Login to Docker Hub
972+
uses: docker/login-action@v3
973+
with:
974+
username: "${{ secrets.DOCKERHUB_USERNAME }}"
975+
password: "${{ secrets.DOCKERHUB_TOKEN }}"
976+
continue-on-error: true
977+
978+
- name: Login to GHCR
979+
uses: docker/login-action@v3
980+
with:
981+
registry: ghcr.io
982+
username: "${{ github.actor }}"
983+
password: "${{ secrets.GITHUB_TOKEN }}"
984+
continue-on-error: true
985+
986+
#https://hub.docker.com/r/pkgforge/debian-ix
987+
- name: Docker Build and Push (debian-ix)
988+
uses: docker/build-push-action@v6
989+
with:
990+
context: /tmp/DOCKERFILES/
991+
file: "/tmp/DOCKERFILES/debian-ix.dockerfile"
992+
platforms: "linux/${{ matrix.platform }}"
993+
build-args: |
994+
ARCH=${{ matrix.arch }}
995+
tags: |
996+
pkgforge/debian-ix:${{ matrix.arch }}
997+
pkgforge/debian-ix:${{ matrix.arch }}-${{ env.DOCKER_TAG }}
998+
ghcr.io/pkgforge/devscripts/debian-ix:${{ matrix.arch }}
999+
ghcr.io/pkgforge/devscripts/debian-ix:${{ matrix.arch }}-${{ env.DOCKER_TAG }}
1000+
push: true
1001+
continue-on-error: true
8421002
#------------------------------------------------------------------------------------#
8431003
build-push-docker-gentoo-builder:
8441004
name: Push (gentoo-builder) --> Docker Hub

Github/Runners/alpine-ix.dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# syntax=docker/dockerfile:1
22
#------------------------------------------------------------------------------------#
33
#https://hub.docker.com/r/pkgforge/alpine-ix
4-
FROM alpine:edge
4+
#FROM alpine:edge
5+
ARG ARCH
6+
FROM "pkgforge/alpine-ix:${ARCH}"
57
ENV GIT_REPO="https://github.com/pg83/ix"
68
#ENV GIT_REPO="https://github.com/stal-ix/ix"
79
#------------------------------------------------------------------------------------#

Github/Runners/debian-ix.dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# syntax=docker/dockerfile:1
22
#------------------------------------------------------------------------------------#
33
#https://hub.docker.com/r/pkgforge/debian-ix
4-
FROM debian:unstable
4+
#FROM debian:unstable
5+
ARG ARCH
6+
FROM "pkgforge/debian-ix:${ARCH}"
57
ENV GIT_REPO="https://github.com/pg83/ix"
68
#ENV GIT_REPO="https://github.com/stal-ix/ix"
79
#------------------------------------------------------------------------------------#

Linux/install_ix.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
pushd "${HOME}/ix" &>/dev/null
116116
(
117117
while true; do
118-
if [[ -d "/ix/trash" ]]; then
118+
if [[ -d "/ix/trash" ]] && [[ "$(du -s "/ix/trash" | cut -f1)" -gt 1000 ]]; then
119119
echo -e "\n[BG] Purging '/ix/trash'"
120120
du -sh "/ix/trash" 2>/dev/null ; echo -e "\n"
121121
find "/ix/trash" -mindepth 1 -delete &>/dev/null
@@ -150,7 +150,7 @@
150150
sudo kill -9 "${bg_pid}" 2>/dev/null
151151
sudo pkill -9 -f "while true.*ix/trash" 2>/dev/null
152152
sudo pkill -9 -f "sleep 120*" 2>/dev/null
153-
if [[ -d "/ix/trash" ]]; then
153+
if [[ -d "/ix/trash" ]] && [[ "$(du -s "/ix/trash" | cut -f1)" -gt 1000 ]]; then
154154
echo -e "\n[BG] Purging '/ix/trash'\n"
155155
find "/ix/trash" -mindepth 1 -delete &>/dev/null
156156
fi

0 commit comments

Comments
 (0)