🐬 Push Bootstrap Images (aarch64) 🐬 #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 🐬 Push Bootstrap Images (aarch64) 🐬 | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 */3 * *" #every 3 Days @5:45 AM NPT | |
| jobs: | |
| push-aarch64: | |
| #runs-on: ubuntu-latest | |
| runs-on: ubuntu-24.04-arm | |
| timeout-minutes: 200 | |
| permissions: | |
| attestations: write | |
| contents: write | |
| id-token: write | |
| packages: write | |
| statuses: read | |
| strategy: | |
| matrix: | |
| include: | |
| - image: "archlinux-base" | |
| script: "${GITHUB_WORKSPACE}/main/Github/Runners/bootstrap/archlinux.sh" | |
| arch: "aarch64" | |
| file: "/tmp/rootfs.tar" | |
| #- image: "artix-base" | |
| # script: "${GITHUB_WORKSPACE}/main/Github/Runners/bootstrap/artix.sh" | |
| # arch: "aarch64" | |
| # file: "/tmp/rootfs.tar" | |
| #- image: "cachyos-base" | |
| # script: "${GITHUB_WORKSPACE}/main/Github/Runners/bootstrap/cachyos.sh" | |
| # arch: "aarch64" | |
| # file: "/tmp/rootfs.tar" | |
| - image: "eweos-base" | |
| script: "${GITHUB_WORKSPACE}/main/Github/Runners/bootstrap/eweos.sh" | |
| arch: "aarch64" | |
| file: "/tmp/rootfs.tar" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: main | |
| filter: "blob:none" | |
| - name: Debloat Runner | |
| run: | | |
| #Presets | |
| set +x ; set +e | |
| #--------------# | |
| bash <(curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Github/Runners/debloat_ubuntu.sh") | |
| continue-on-error: true | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| continue-on-error: true | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| continue-on-error: true | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: "${{ secrets.DOCKERHUB_USERNAME }}" | |
| password: "${{ secrets.DOCKERHUB_TOKEN }}" | |
| continue-on-error: true | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: "${{ github.actor }}" | |
| password: "${{ secrets.GITHUB_TOKEN }}" | |
| continue-on-error: true | |
| - name: Install Addons | |
| run: | | |
| #presets | |
| set +x ; set +e | |
| #-------------# | |
| bash <(curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Linux/install_bins_curl.sh") | |
| continue-on-error: true | |
| - name: Setup Env | |
| run: | | |
| #presets | |
| set +x ; set +e | |
| #-------------# | |
| #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: Push (${{ matrix.image }}/${{ matrix.arch }}) | |
| env: | |
| DOCKERHUB_USERNAME: "${{ secrets.DOCKERHUB_USERNAME }}" | |
| 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_IMAGE="TRUE" | |
| echo "HAS_IMAGE=${HAS_IMAGE}" >> "${GITHUB_ENV}" | |
| UTC_TIME="$(TZ='UTC' date +'%Y_%m_%d')" | |
| echo "UTC_TIME=${UTC_TIME}" >> "${GITHUB_ENV}" | |
| else | |
| export HAS_IMAGE="FALSE" | |
| echo "HAS_IMAGE=${HAS_IMAGE}" >> "${GITHUB_ENV}" | |
| fi | |
| continue-on-error: true | |
| - name: Fail (If Push Failed) | |
| if: env.HAS_IMAGE == 'FALSE' | |
| run: | | |
| #presets | |
| set +x ; set +e | |
| #-------------# | |
| exit 1 | |
| continue-on-error: false | |
| #Artifacts | |
| - name: Upload (Build) Artifacts | |
| if: env.HAS_IMAGE == 'TRUE' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ARTIFACTS | |
| 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_IMAGE == '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_IMAGE == '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_IMAGE == 'TRUE' | |
| uses: actions/[email protected] | |
| with: | |
| subject-name: "image-${{ matrix.image }}-${{ matrix.arch }}" | |
| subject-path: ${{ matrix.file }} | |
| show-summary: true | |
| continue-on-error: true |