Skip to content

🐬 Create RunImage Images (x86_64) 🐬 #90

🐬 Create RunImage Images (x86_64) 🐬

🐬 Create RunImage Images (x86_64) 🐬 #90

name: 🐬 Create RunImage Images (x86_64) 🐬
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
- cron: "0 */12 * * *" # Every 12 Hrs
jobs:
push-x86_64:
runs-on: ubuntu-latest
timeout-minutes: 200
permissions:
attestations: write
contents: write
id-token: write
packages: write
statuses: read
strategy:
matrix:
include:
- image: "alpine"
script: "${GITHUB_WORKSPACE}/main/alpine.sh"
arch: "x86_64"
file: "/tmp/runimage"
- image: "archlinux"
script: "${GITHUB_WORKSPACE}/main/archlinux.sh"
arch: "x86_64"
file: "/tmp/runimage"
- image: "artix"
script: "${GITHUB_WORKSPACE}/main/artix.sh"
arch: "x86_64"
file: "/tmp/runimage"
- image: "cachyos"
script: "${GITHUB_WORKSPACE}/main/cachyos.sh"
arch: "x86_64"
file: "/tmp/runimage"
- image: "debian"
script: "${GITHUB_WORKSPACE}/main/debian.sh"
arch: "x86_64"
file: "/tmp/runimage"
- image: "eweos"
script: "${GITHUB_WORKSPACE}/main/eweos.sh"
arch: "x86_64"
file: "/tmp/runimage"
- image: "ubuntu"
script: "${GITHUB_WORKSPACE}/main/ubuntu.sh"
arch: "x86_64"
file: "/tmp/runimage"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: main
filter: "blob:none"
- name: Setup Env
run: |
#presets
set +x ; set +e
#-------------#
##CoreUtils
sudo apt update -y
sudo apt install bc coreutils curl dos2unix fdupes jq moreutils wget -y
sudo apt-get install apt-transport-https apt-utils ca-certificates coreutils dos2unix gnupg2 jq moreutils p7zip-full rename rsync software-properties-common texinfo tmux util-linux wget -y 2>/dev/null ; sudo apt-get update -y 2>/dev/null
#tmp
SYSTMP="$(dirname $(mktemp -u))" && export SYSTMP="${SYSTMP}"
echo "SYSTMP=${SYSTMP}" >> "${GITHUB_ENV}"
#-------------#
##User-Agent
USER_AGENT="$(curl -qfsSL 'https://pub.ajam.dev/repos/Azathothas/Wordlists/Misc/User-Agents/ua_chrome_macos_latest.txt')" && export USER_AGENT="${USER_AGENT}"
echo "USER_AGENT=${USER_AGENT}" >> "${GITHUB_ENV}"
continue-on-error: true
- name: Disable apparmor_restrict_unprivileged_userns
run: |
#presets
set +x ; set +e
#-------------#
echo "kernel.apparmor_restrict_unprivileged_userns=0" | sudo tee "/etc/sysctl.d/98-apparmor-unuserns.conf"
echo "0" | sudo tee "/proc/sys/kernel/apparmor_restrict_unprivileged_userns"
sudo service procps restart
sudo sysctl -p "/etc/sysctl.conf"
continue-on-error: true
- name: Create (${{ matrix.image }}/${{ matrix.arch }})
run: |
#presets
set +x ; set +e
#-------------#
dos2unix --quiet "${{ matrix.script }}"
chmod +x "${{ matrix.script }}"
bash "${{ matrix.script }}"
continue-on-error: true
- name: Check
run: |
#presets
set +x ; set +e
#-------------#
if [[ -s "${{ matrix.file }}" ]] && [[ $(stat -c%s "${{ matrix.file }}") -gt 10000 ]]; then
export HAS_RUNIMAGE="TRUE"
echo "HAS_RUNIMAGE=${HAS_RUNIMAGE}" >> "${GITHUB_ENV}"
UTC_TIME="$(TZ='UTC' date +'%Y_%m_%d')"
echo "UTC_TIME=${UTC_TIME}" >> "${GITHUB_ENV}"
else
export HAS_RUNIMAGE="FALSE"
echo "HAS_RUNIMAGE=${HAS_RUNIMAGE}" >> "${GITHUB_ENV}"
fi
continue-on-error: true
- name: Fail (If Create Failed)
if: env.HAS_RUNIMAGE == 'FALSE'
run: |
#presets
set +x ; set +e
#-------------#
exit 1
continue-on-error: false
#Artifacts
- name: Upload (Build) Artifacts
if: env.HAS_RUNIMAGE == 'TRUE'
uses: actions/upload-artifact@v4
with:
name: "ARTIFACTS-${{ matrix.image }}_${{ matrix.arch }}"
path: |
${{ matrix.file }}
compression-level: 0 #no compression, [Default: 6 (GNU Gzip)]
retention-days: 90 #max
overwrite: true
continue-on-error: true
#continuous
- name: Releaser (Continuous)
if: env.HAS_RUNIMAGE == 'TRUE'
uses: softprops/[email protected]
with:
name: "Continuous ${{ matrix.image }}_${{ matrix.arch }}"
tag_name: "${{ matrix.image }}_${{ matrix.arch }}"
prerelease: true
draft: false
generate_release_notes: false
files: |
${{ matrix.file }}
continue-on-error: true
#Snapshot
- name: Releaser (Snapshot)
if: env.HAS_RUNIMAGE == 'TRUE'
uses: softprops/[email protected]
with:
name: "Snapshot-(${{ matrix.image }}_${{ matrix.arch }}_${{ env.UTC_TIME }}"
tag_name: "${{ matrix.image }}_${{ matrix.arch }}_${{ env.UTC_TIME }}"
prerelease: false
draft: false
generate_release_notes: false
make_latest: false
files: |
${{ matrix.file }}
continue-on-error: true
#Build Provenance
- name: Attest Build Provenance
if: env.HAS_RUNIMAGE == 'TRUE'
uses: actions/[email protected]
with:
subject-name: "image-${{ matrix.image }}-${{ matrix.arch }}"
subject-path: ${{ matrix.file }}
show-summary: true
continue-on-error: true