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