Skip to content

Commit b4583b5

Browse files
committed
arm
1 parent fb3f7ab commit b4583b5

File tree

1 file changed

+191
-0
lines changed

1 file changed

+191
-0
lines changed
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
name: 🐬 Push Bootstrap Images (aarch64) 🐬
2+
concurrency:
3+
group: "${{ github.workflow }}-${{ github.ref }}"
4+
cancel-in-progress: true
5+
6+
on:
7+
workflow_dispatch:
8+
schedule:
9+
- cron: "0 0 */3 * *" #every 3 Days @5:45 AM NPT
10+
jobs:
11+
push-aarch64:
12+
#runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04-arm
14+
timeout-minutes: 200
15+
permissions:
16+
attestations: write
17+
contents: write
18+
id-token: write
19+
packages: write
20+
statuses: read
21+
strategy:
22+
matrix:
23+
include:
24+
- image: "archlinux-base"
25+
script: "${GITHUB_WORKSPACE}/main/Github/Runners/bootstrap/archlinux.sh"
26+
arch: "aarch64"
27+
file: "/tmp/rootfs.tar"
28+
29+
#- image: "artix-base"
30+
# script: "${GITHUB_WORKSPACE}/main/Github/Runners/bootstrap/artix.sh"
31+
# arch: "aarch64"
32+
# file: "/tmp/rootfs.tar"
33+
34+
#- image: "cachyos-base"
35+
# script: "${GITHUB_WORKSPACE}/main/Github/Runners/bootstrap/cachyos.sh"
36+
# arch: "aarch64"
37+
# file: "/tmp/rootfs.tar"
38+
39+
- image: "eweos-base"
40+
script: "${GITHUB_WORKSPACE}/main/Github/Runners/bootstrap/eweos.sh"
41+
arch: "aarch64"
42+
file: "/tmp/rootfs.tar"
43+
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
with:
48+
path: main
49+
filter: "blob:none"
50+
51+
- name: Debloat Runner
52+
run: |
53+
#Presets
54+
set +x ; set +e
55+
#--------------#
56+
bash <(curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Github/Runners/debloat_ubuntu.sh")
57+
continue-on-error: true
58+
59+
- name: Set up QEMU
60+
uses: docker/setup-qemu-action@v3
61+
continue-on-error: true
62+
63+
- name: Set up Docker Buildx
64+
uses: docker/setup-buildx-action@v3
65+
continue-on-error: true
66+
67+
- name: Login to Docker Hub
68+
uses: docker/login-action@v3
69+
with:
70+
username: "${{ secrets.DOCKERHUB_USERNAME }}"
71+
password: "${{ secrets.DOCKERHUB_TOKEN }}"
72+
continue-on-error: true
73+
74+
- name: Login to GHCR
75+
uses: docker/login-action@v3
76+
with:
77+
registry: ghcr.io
78+
username: "${{ github.actor }}"
79+
password: "${{ secrets.GITHUB_TOKEN }}"
80+
continue-on-error: true
81+
82+
- name: Install Addons
83+
run: |
84+
#presets
85+
set +x ; set +e
86+
#-------------#
87+
bash <(curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Linux/install_bins_curl.sh")
88+
continue-on-error: true
89+
90+
- name: Setup Env
91+
run: |
92+
#presets
93+
set +x ; set +e
94+
#-------------#
95+
#tmp
96+
SYSTMP="$(dirname $(mktemp -u))" && export SYSTMP="${SYSTMP}"
97+
echo "SYSTMP=${SYSTMP}" >> "${GITHUB_ENV}"
98+
#-------------#
99+
##User-Agent
100+
USER_AGENT="$(curl -qfsSL 'https://pub.ajam.dev/repos/Azathothas/Wordlists/Misc/User-Agents/ua_chrome_macos_latest.txt')" && export USER_AGENT="${USER_AGENT}"
101+
echo "USER_AGENT=${USER_AGENT}" >> "${GITHUB_ENV}"
102+
continue-on-error: true
103+
104+
- name: Push (${{ matrix.image }}/${{ matrix.arch }})
105+
env:
106+
DOCKERHUB_USERNAME: "${{ secrets.DOCKERHUB_USERNAME }}"
107+
run: |
108+
#presets
109+
set +x ; set +e
110+
#-------------#
111+
dos2unix --quiet "${{ matrix.script }}"
112+
chmod +x "${{ matrix.script }}"
113+
bash "${{ matrix.script }}"
114+
continue-on-error: true
115+
116+
- name: Check
117+
run: |
118+
#presets
119+
set +x ; set +e
120+
#-------------#
121+
if [[ -s "${{ matrix.file }}" ]] && [[ $(stat -c%s "${{ matrix.file }}") -gt 10000 ]]; then
122+
export HAS_IMAGE="TRUE"
123+
echo "HAS_IMAGE=${HAS_IMAGE}" >> "${GITHUB_ENV}"
124+
UTC_TIME="$(TZ='UTC' date +'%Y_%m_%d')"
125+
echo "UTC_TIME=${UTC_TIME}" >> "${GITHUB_ENV}"
126+
else
127+
export HAS_IMAGE="FALSE"
128+
echo "HAS_IMAGE=${HAS_IMAGE}" >> "${GITHUB_ENV}"
129+
fi
130+
continue-on-error: true
131+
132+
- name: Fail (If Push Failed)
133+
if: env.HAS_IMAGE == 'FALSE'
134+
run: |
135+
#presets
136+
set +x ; set +e
137+
#-------------#
138+
exit 1
139+
continue-on-error: false
140+
141+
#Artifacts
142+
- name: Upload (Build) Artifacts
143+
if: env.HAS_IMAGE == 'TRUE'
144+
uses: actions/upload-artifact@v4
145+
with:
146+
name: ARTIFACTS
147+
path: |
148+
${{ matrix.file }}
149+
compression-level: 0 #no compression, [Default: 6 (GNU Gzip)]
150+
retention-days: 90 #max
151+
overwrite: true
152+
continue-on-error: true
153+
154+
#continuous
155+
- name: Releaser (Continuous)
156+
if: env.HAS_IMAGE == 'TRUE'
157+
uses: softprops/[email protected]
158+
with:
159+
name: "Continuous ${{ matrix.image }}_${{ matrix.arch }}"
160+
tag_name: "${{ matrix.image }}_${{ matrix.arch }}"
161+
prerelease: true
162+
draft: false
163+
generate_release_notes: false
164+
files: |
165+
${{ matrix.file }}
166+
continue-on-error: true
167+
168+
#Snapshot
169+
- name: Releaser (Snapshot)
170+
if: env.HAS_IMAGE == 'TRUE'
171+
uses: softprops/[email protected]
172+
with:
173+
name: "Snapshot-(${{ matrix.image }}_${{ matrix.arch }}_${{ env.UTC_TIME }}"
174+
tag_name: "${{ matrix.image }}_${{ matrix.arch }}_${{ env.UTC_TIME }}"
175+
prerelease: false
176+
draft: false
177+
generate_release_notes: false
178+
make_latest: false
179+
files: |
180+
${{ matrix.file }}
181+
continue-on-error: true
182+
183+
#Build Provenance
184+
- name: Attest Build Provenance
185+
if: env.HAS_IMAGE == 'TRUE'
186+
uses: actions/[email protected]
187+
with:
188+
subject-name: "image-${{ matrix.image }}-${{ matrix.arch }}"
189+
subject-path: ${{ matrix.file }}
190+
show-summary: true
191+
continue-on-error: true

0 commit comments

Comments
 (0)