1+ name : 🐬 Create RunImage 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 : " alpine"
25+ script : " ${GITHUB_WORKSPACE}/main/alpine.sh"
26+ arch : " aarch64"
27+ file : " /tmp/runimage"
28+
29+ - image : " archlinux"
30+ script : " ${GITHUB_WORKSPACE}/main/archlinux.sh"
31+ arch : " aarch64"
32+ file : " /tmp/runimage"
33+
34+ - image : " debian"
35+ script : " ${GITHUB_WORKSPACE}/main/debian.sh"
36+ arch : " aarch64"
37+ file : " /tmp/runimage"
38+
39+ - image : " eweos"
40+ script : " ${GITHUB_WORKSPACE}/main/eweos.sh"
41+ arch : " aarch64"
42+ file : " /tmp/runimage"
43+
44+ - image : " ubuntu"
45+ script : " ${GITHUB_WORKSPACE}/main/ubuntu.sh"
46+ arch : " aarch64"
47+ file : " /tmp/runimage"
48+
49+ steps :
50+ - name : Checkout repository
51+ uses : actions/checkout@v4
52+ with :
53+ path : main
54+ filter : " blob:none"
55+
56+ - name : Setup Env
57+ run : |
58+ #presets
59+ set +x ; set +e
60+ #-------------#
61+ #tmp
62+ SYSTMP="$(dirname $(mktemp -u))" && export SYSTMP="${SYSTMP}"
63+ echo "SYSTMP=${SYSTMP}" >> "${GITHUB_ENV}"
64+ #-------------#
65+ ##User-Agent
66+ USER_AGENT="$(curl -qfsSL 'https://pub.ajam.dev/repos/Azathothas/Wordlists/Misc/User-Agents/ua_chrome_macos_latest.txt')" && export USER_AGENT="${USER_AGENT}"
67+ echo "USER_AGENT=${USER_AGENT}" >> "${GITHUB_ENV}"
68+ continue-on-error : true
69+
70+ - name : Create (${{ matrix.image }}/${{ matrix.arch }})
71+ run : |
72+ #presets
73+ set +x ; set +e
74+ #-------------#
75+ dos2unix --quiet "${{ matrix.script }}"
76+ chmod +x "${{ matrix.script }}"
77+ bash "${{ matrix.script }}"
78+ continue-on-error : true
79+
80+ - name : Check
81+ run : |
82+ #presets
83+ set +x ; set +e
84+ #-------------#
85+ if [[ -s "${{ matrix.file }}" ]] && [[ $(stat -c%s "${{ matrix.file }}") -gt 10000 ]]; then
86+ export HAS_RUNIMAGE="TRUE"
87+ echo "HAS_RUNIMAGE=${HAS_RUNIMAGE}" >> "${GITHUB_ENV}"
88+ UTC_TIME="$(TZ='UTC' date +'%Y_%m_%d')"
89+ echo "UTC_TIME=${UTC_TIME}" >> "${GITHUB_ENV}"
90+ else
91+ export HAS_RUNIMAGE="FALSE"
92+ echo "HAS_RUNIMAGE=${HAS_RUNIMAGE}" >> "${GITHUB_ENV}"
93+ fi
94+ continue-on-error : true
95+
96+ - name : Fail (If Push Failed)
97+ if : env.HAS_RUNIMAGE == 'FALSE'
98+ run : |
99+ #presets
100+ set +x ; set +e
101+ #-------------#
102+ exit 1
103+ continue-on-error : false
104+
105+ # Artifacts
106+ - name : Upload (Build) Artifacts
107+ if : env.HAS_RUNIMAGE == 'TRUE'
108+ uses : actions/upload-artifact@v4
109+ with :
110+ name : " ARTIFACTS-${{ matrix.image }}_${{ matrix.arch }}"
111+ path : |
112+ ${{ matrix.file }}
113+ compression-level : 0 # no compression, [Default: 6 (GNU Gzip)]
114+ retention-days : 90 # max
115+ overwrite : true
116+ continue-on-error : true
117+
118+ # continuous
119+ - name : Releaser (Continuous)
120+ if : env.HAS_RUNIMAGE == 'TRUE'
121+ 122+ with :
123+ name : " Continuous ${{ matrix.image }}_${{ matrix.arch }}"
124+ tag_name : " ${{ matrix.image }}_${{ matrix.arch }}"
125+ prerelease : true
126+ draft : false
127+ generate_release_notes : false
128+ files : |
129+ ${{ matrix.file }}
130+ continue-on-error : true
131+
132+ # Snapshot
133+ - name : Releaser (Snapshot)
134+ if : env.HAS_RUNIMAGE == 'TRUE'
135+ 136+ with :
137+ name : " Snapshot-(${{ matrix.image }}_${{ matrix.arch }}_${{ env.UTC_TIME }}"
138+ tag_name : " ${{ matrix.image }}_${{ matrix.arch }}_${{ env.UTC_TIME }}"
139+ prerelease : false
140+ draft : false
141+ generate_release_notes : false
142+ make_latest : false
143+ files : |
144+ ${{ matrix.file }}
145+ continue-on-error : true
146+
147+ # Build Provenance
148+ - name : Attest Build Provenance
149+ if : env.HAS_RUNIMAGE == 'TRUE'
150+ 151+ with :
152+ subject-name : " image-${{ matrix.image }}-${{ matrix.arch }}"
153+ subject-path : ${{ matrix.file }}
154+ show-summary : true
155+ continue-on-error : true
0 commit comments