1+ name : 🐬 Build Alpine Rust Images DockerHub 🐬
2+ # ------------------------------------------------------------------------------------#
3+ on :
4+ # push:
5+ workflow_dispatch :
6+ schedule :
7+ - cron : " 0 2,14 * * *" # 02:00 AM/PM UTC (07:45 AM/PM NPT)
8+ defaults :
9+ run :
10+ shell : bash
11+ working-directory : /tmp
12+ permissions :
13+ contents : read
14+ packages : write
15+ jobs :
16+ # ------------------------------------------------------------------------------------#
17+ build-push-alpine-rust-nightly :
18+ name : Push (Alpine rust nightly ${{ matrix.arch }}) --> Docker Hub
19+ runs-on : ${{ matrix.runner }}
20+ strategy :
21+ matrix :
22+ include :
23+ - arch : aarch64
24+ platform : arm64
25+ runner : ubuntu-24.04-arm
26+ toolchain : nightly
27+
28+ - arch : loongarch64
29+ platform : loong64
30+ runner : ubuntu-latest
31+ toolchain : nightly
32+
33+ - arch : riscv64
34+ platform : riscv64
35+ runner : ubuntu-latest
36+ toolchain : nightly
37+
38+ - arch : x86_64
39+ platform : amd64
40+ runner : ubuntu-latest
41+ toolchain : nightly
42+
43+ steps :
44+ - name : Checkout repository
45+ uses : actions/checkout@v4
46+ with :
47+ path : main
48+ filter : " blob:none"
49+
50+ - name : Install Addons
51+ run : |
52+ ##Presets
53+ set +x ; set +e
54+ #-------------#
55+ ##Debug?
56+ if [[ "${DEBUG}" = "1" ]] || [[ "${DEBUG}" = "ON" ]]; then
57+ set -x
58+ fi
59+ #-------------#
60+ #export PARALLEL=1
61+ #bash <(curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Linux/install_bins_curl.sh")
62+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/7z" -o "/usr/bin/7z" &
63+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/7z" -o "/usr/local/bin/7z" &
64+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/ansi2txt" -o "/usr/local/bin/ansi2txt" &
65+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/aria2" -o "/usr/local/bin/aria2" &
66+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/aria2" -o "/usr/local/bin/aria2c" &
67+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/askalono" -o "/usr/local/bin/askalono" &
68+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/bsdtar" -o "/usr/local/bin/bsdtar" &
69+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/b3sum" -o "/usr/local/bin/b3sum" &
70+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/dasel" -o "/usr/local/bin/dasel" &
71+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/eget" -o "/usr/local/bin/eget" &
72+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/huggingface-cli" -o "/usr/local/bin/huggingface-cli" &
73+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/jq" -o "/usr/local/bin/jq" &
74+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/oras" -o "/usr/local/bin/oras" &
75+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/ouch" -o "/usr/local/bin/ouch" &
76+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/rsync" -o "/usr/local/bin/rsync" &
77+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/trufflehog" -o "/usr/local/bin/trufflehog" &
78+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/xq" -o "/usr/local/bin/xq" &
79+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/xz" -o "/usr/local/bin/xz" &
80+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/yq" -o "/usr/local/bin/yq" &
81+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/zstd" -o "/usr/bin/zstd" &
82+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/zstd" -o "/usr/local/bin/zstd" &
83+ wait ; echo
84+ sudo chmod -v 'a+x' \
85+ "/usr/bin/7z" \
86+ "/usr/local/bin/7z" \
87+ "/usr/local/bin/ansi2txt" \
88+ "/usr/local/bin/aria2" \
89+ "/usr/local/bin/aria2c" \
90+ "/usr/local/bin/askalono" \
91+ "/usr/local/bin/bsdtar" \
92+ "/usr/local/bin/b3sum" \
93+ "/usr/local/bin/dasel" \
94+ "/usr/local/bin/eget" \
95+ "/usr/local/bin/huggingface-cli" \
96+ "/usr/local/bin/jq" \
97+ "/usr/local/bin/oras" \
98+ "/usr/local/bin/ouch" \
99+ "/usr/local/bin/rsync" \
100+ "/usr/local/bin/trufflehog" \
101+ "/usr/local/bin/xq" \
102+ "/usr/local/bin/xz" \
103+ "/usr/local/bin/yq" \
104+ "/usr/bin/zstd" \
105+ "/usr/local/bin/zstd"
106+ continue-on-error : true
107+
108+ - name : Setup Env
109+ run : |
110+ #Presets
111+ set +x ; set +e
112+ #--------------#
113+ #Docker Tags
114+ DOCKER_TAG="v$(date +'%Y.%m.%d')" && export DOCKER_TAG="${DOCKER_TAG}"
115+ echo "DOCKER_TAG=${DOCKER_TAG}" >> "${GITHUB_ENV}"
116+ #Copy dockerfiles
117+ mkdir -p "/tmp/DOCKERFILES" && cd "/tmp/DOCKERFILES"
118+ cp "${GITHUB_WORKSPACE}/main/Github/Runners/alpine-rust.dockerfile" "/tmp/DOCKERFILES/alpine-rust.dockerfile"
119+ continue-on-error : false
120+
121+ - name : Set up QEMU
122+ uses : docker/setup-qemu-action@v3
123+ continue-on-error : true
124+
125+ - name : Set up Docker Buildx
126+ uses : docker/setup-buildx-action@v3
127+ continue-on-error : true
128+
129+ - name : Login to Docker Hub
130+ uses : docker/login-action@v3
131+ with :
132+ username : " ${{ secrets.DOCKERHUB_USERNAME }}"
133+ password : " ${{ secrets.DOCKERHUB_TOKEN }}"
134+ continue-on-error : true
135+
136+ - name : Login to GHCR
137+ uses : docker/login-action@v3
138+ with :
139+ registry : ghcr.io
140+ username : " ${{ github.actor }}"
141+ password : " ${{ secrets.GITHUB_TOKEN }}"
142+ continue-on-error : true
143+
144+ # https://hub.docker.com/r/pkgforge/alpine-rust-nightly
145+ - name : Docker Build and Push (alpine-rust-nightly)
146+ uses : docker/build-push-action@v6
147+ with :
148+ context : /tmp/DOCKERFILES/
149+ file : " /tmp/DOCKERFILES/alpine-rust.dockerfile"
150+ platforms : " linux/${{ matrix.platform }}"
151+ build-args : |
152+ ARCH=${{ matrix.arch }}
153+ TOOLCHAIN=${{ matrix.toolchain }}
154+ tags : |
155+ pkgforge/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }}
156+ pkgforge/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }}-${{ env.DOCKER_TAG }}
157+ ghcr.io/pkgforge/devscripts/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }}
158+ ghcr.io/pkgforge/devscripts/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }}-${{ env.DOCKER_TAG }}
159+ push : true
160+ continue-on-error : true
161+
162+ - name : Print Manifest (docker.io/pkgforge/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }})
163+ run : |
164+ #Presets
165+ set +x ; set +e
166+ #--------------#
167+ docker manifest inspect "docker.io/pkgforge/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }}" 2>/dev/null | jq .
168+ continue-on-error : true
169+
170+ - name : Print Manifest (ghcr.io/pkgforge/devscripts/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }})
171+ run : |
172+ #Presets
173+ set +x ; set +e
174+ #--------------#
175+ docker manifest inspect "ghcr.io/pkgforge/devscripts/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }}" 2>/dev/null | jq .
176+ continue-on-error : true
177+ # ------------------------------------------------------------------------------------#
178+ build-push-alpine-rust-stable :
179+ name : Push (Alpine rust stable ${{ matrix.arch }}) --> Docker Hub
180+ runs-on : ${{ matrix.runner }}
181+ strategy :
182+ matrix :
183+ include :
184+ - arch : aarch64
185+ platform : arm64
186+ runner : ubuntu-24.04-arm
187+ toolchain : stable
188+
189+ - arch : loongarch64
190+ platform : loong64
191+ runner : ubuntu-latest
192+ toolchain : stable
193+
194+ - arch : riscv64
195+ platform : riscv64
196+ runner : ubuntu-latest
197+ toolchain : stable
198+
199+ - arch : x86_64
200+ platform : amd64
201+ runner : ubuntu-latest
202+ toolchain : stable
203+
204+ steps :
205+ - name : Checkout repository
206+ uses : actions/checkout@v4
207+ with :
208+ path : main
209+ filter : " blob:none"
210+
211+ - name : Install Addons
212+ run : |
213+ ##Presets
214+ set +x ; set +e
215+ #-------------#
216+ ##Debug?
217+ if [[ "${DEBUG}" = "1" ]] || [[ "${DEBUG}" = "ON" ]]; then
218+ set -x
219+ fi
220+ #-------------#
221+ #export PARALLEL=1
222+ #bash <(curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Linux/install_bins_curl.sh")
223+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/7z" -o "/usr/bin/7z" &
224+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/7z" -o "/usr/local/bin/7z" &
225+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/ansi2txt" -o "/usr/local/bin/ansi2txt" &
226+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/aria2" -o "/usr/local/bin/aria2" &
227+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/aria2" -o "/usr/local/bin/aria2c" &
228+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/askalono" -o "/usr/local/bin/askalono" &
229+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/bsdtar" -o "/usr/local/bin/bsdtar" &
230+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/b3sum" -o "/usr/local/bin/b3sum" &
231+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/dasel" -o "/usr/local/bin/dasel" &
232+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/eget" -o "/usr/local/bin/eget" &
233+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/huggingface-cli" -o "/usr/local/bin/huggingface-cli" &
234+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/jq" -o "/usr/local/bin/jq" &
235+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/oras" -o "/usr/local/bin/oras" &
236+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/ouch" -o "/usr/local/bin/ouch" &
237+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/rsync" -o "/usr/local/bin/rsync" &
238+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/trufflehog" -o "/usr/local/bin/trufflehog" &
239+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/xq" -o "/usr/local/bin/xq" &
240+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/xz" -o "/usr/local/bin/xz" &
241+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/yq" -o "/usr/local/bin/yq" &
242+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/zstd" -o "/usr/bin/zstd" &
243+ sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/zstd" -o "/usr/local/bin/zstd" &
244+ wait ; echo
245+ sudo chmod -v 'a+x' \
246+ "/usr/bin/7z" \
247+ "/usr/local/bin/7z" \
248+ "/usr/local/bin/ansi2txt" \
249+ "/usr/local/bin/aria2" \
250+ "/usr/local/bin/aria2c" \
251+ "/usr/local/bin/askalono" \
252+ "/usr/local/bin/bsdtar" \
253+ "/usr/local/bin/b3sum" \
254+ "/usr/local/bin/dasel" \
255+ "/usr/local/bin/eget" \
256+ "/usr/local/bin/huggingface-cli" \
257+ "/usr/local/bin/jq" \
258+ "/usr/local/bin/oras" \
259+ "/usr/local/bin/ouch" \
260+ "/usr/local/bin/rsync" \
261+ "/usr/local/bin/trufflehog" \
262+ "/usr/local/bin/xq" \
263+ "/usr/local/bin/xz" \
264+ "/usr/local/bin/yq" \
265+ "/usr/bin/zstd" \
266+ "/usr/local/bin/zstd"
267+ continue-on-error : true
268+
269+ - name : Setup Env
270+ run : |
271+ #Presets
272+ set +x ; set +e
273+ #--------------#
274+ #Docker Tags
275+ DOCKER_TAG="v$(date +'%Y.%m.%d')" && export DOCKER_TAG="${DOCKER_TAG}"
276+ echo "DOCKER_TAG=${DOCKER_TAG}" >> "${GITHUB_ENV}"
277+ #Copy dockerfiles
278+ mkdir -p "/tmp/DOCKERFILES" && cd "/tmp/DOCKERFILES"
279+ cp "${GITHUB_WORKSPACE}/main/Github/Runners/alpine-rust.dockerfile" "/tmp/DOCKERFILES/alpine-rust.dockerfile"
280+ continue-on-error : false
281+
282+ - name : Set up QEMU
283+ uses : docker/setup-qemu-action@v3
284+ continue-on-error : true
285+
286+ - name : Set up Docker Buildx
287+ uses : docker/setup-buildx-action@v3
288+ continue-on-error : true
289+
290+ - name : Login to Docker Hub
291+ uses : docker/login-action@v3
292+ with :
293+ username : " ${{ secrets.DOCKERHUB_USERNAME }}"
294+ password : " ${{ secrets.DOCKERHUB_TOKEN }}"
295+ continue-on-error : true
296+
297+ - name : Login to GHCR
298+ uses : docker/login-action@v3
299+ with :
300+ registry : ghcr.io
301+ username : " ${{ github.actor }}"
302+ password : " ${{ secrets.GITHUB_TOKEN }}"
303+ continue-on-error : true
304+
305+ # https://hub.docker.com/r/pkgforge/alpine-rust-stable
306+ - name : Docker Build and Push (alpine-rust-stable)
307+ uses : docker/build-push-action@v6
308+ with :
309+ context : /tmp/DOCKERFILES/
310+ file : " /tmp/DOCKERFILES/alpine-rust.dockerfile"
311+ platforms : " linux/${{ matrix.platform }}"
312+ build-args : |
313+ ARCH=${{ matrix.arch }}
314+ TOOLCHAIN=${{ matrix.toolchain }}
315+ tags : |
316+ pkgforge/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }}
317+ pkgforge/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }}-${{ env.DOCKER_TAG }}
318+ ghcr.io/pkgforge/devscripts/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }}
319+ ghcr.io/pkgforge/devscripts/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }}-${{ env.DOCKER_TAG }}
320+ push : true
321+ continue-on-error : true
322+
323+ - name : Print Manifest (docker.io/pkgforge/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }})
324+ run : |
325+ #Presets
326+ set +x ; set +e
327+ #--------------#
328+ docker manifest inspect "docker.io/pkgforge/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }}" 2>/dev/null | jq .
329+ continue-on-error : true
330+
331+ - name : Print Manifest (ghcr.io/pkgforge/devscripts/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }})
332+ run : |
333+ #Presets
334+ set +x ; set +e
335+ #--------------#
336+ docker manifest inspect "ghcr.io/pkgforge/devscripts/alpine-rust-${{ matrix.toolchain }}:${{ matrix.arch }}" 2>/dev/null | jq .
337+ continue-on-error : true
338+ # ------------------------------------------------------------------------------------#
0 commit comments