🐬 Fetch Releases 🐬 #1396
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: 🐬 Fetch Releases 🐬 | |
| concurrency: | |
| group: "${{ github.workflow }}-${{ github.ref }}" | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 */6 * * *" # Every 06 Hrs | |
| jobs: | |
| fetch-sync: | |
| runs-on: ${{ matrix.runner }} | |
| timeout-minutes: 20 | |
| permissions: | |
| attestations: write | |
| contents: write | |
| id-token: write | |
| packages: write | |
| statuses: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - title: "astral-glibc" | |
| script: "${GITHUB_WORKSPACE}/main/fetch_astral_glibc.sh" | |
| arch: "aarch64" | |
| file: "/tmp/python.tar" | |
| runner: "ubuntu-24.04-arm" | |
| - title: "astral-glibc" | |
| script: "${GITHUB_WORKSPACE}/main/fetch_astral_glibc.sh" | |
| arch: "x86_64" | |
| file: "/tmp/python.tar" | |
| runner: "ubuntu-latest" | |
| #No musl builds yet | |
| #- title: "astral-musl" | |
| # script: "${GITHUB_WORKSPACE}/main/fetch_astral_musl.sh" | |
| # arch: "aarch64" | |
| # file: "/tmp/python.tar" | |
| # runner: "ubuntu-24.04-arm" | |
| - title: "astral-musl" | |
| script: "${GITHUB_WORKSPACE}/main/fetch_astral_musl.sh" | |
| arch: "x86_64" | |
| file: "/tmp/python.tar" | |
| runner: "ubuntu-latest" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: main | |
| fetch-depth: "1" | |
| 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 | |
| #Git | |
| sudo apt-get install git-lfs -y -qq | |
| echo "GH_PAGER=" >> "${GITHUB_ENV}" | |
| gh config set prompt disabled | |
| #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: 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: Fetch (${{ matrix.title }}/${{ matrix.arch }}) | |
| env: | |
| GHCR_TOKEN: "${{ github.token }}" | |
| GITHUB_TOKEN: "${{ github.token }}" | |
| 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 1000 ]]; then | |
| export HAS_RELEASE="TRUE" | |
| echo "HAS_RELEASE=${HAS_RELEASE}" >> "${GITHUB_ENV}" | |
| UTC_TIME="$(TZ='UTC' date +'%Y_%m_%d')" | |
| echo "UTC_TIME=${UTC_TIME}" >> "${GITHUB_ENV}" | |
| else | |
| export HAS_RELEASE="FALSE" | |
| echo "HAS_RELEASE=${HAS_RELEASE}" >> "${GITHUB_ENV}" | |
| fi | |
| continue-on-error: true | |
| - name: Fail (If Create Failed) | |
| if: env.HAS_RELEASE == 'FALSE' | |
| run: | | |
| #presets | |
| set +x ; set +e | |
| #-------------# | |
| exit 1 | |
| continue-on-error: false | |
| #Artifacts | |
| - name: Upload (Build) Artifacts | |
| if: env.HAS_RELEASE == 'TRUE' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "ARTIFACTS-${{ matrix.title }}_${{ 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_RELEASE == 'TRUE' | |
| uses: softprops/action-gh-release@v2.2.1 | |
| with: | |
| name: "Continuous ${{ matrix.title }}_${{ matrix.arch }}" | |
| tag_name: "${{ matrix.title }}_${{ matrix.arch }}" | |
| prerelease: true | |
| draft: false | |
| generate_release_notes: false | |
| body_path: "/tmp/RELEASE_NOTE.md" | |
| files: | | |
| ${{ matrix.file }} | |
| continue-on-error: true | |
| #Snapshot | |
| - name: Releaser (Snapshot) | |
| if: env.HAS_RELEASE == 'TRUE' | |
| uses: softprops/action-gh-release@v2.2.1 | |
| with: | |
| name: "Snapshot-(${{ matrix.title }}_${{ matrix.arch }}_${{ env.UTC_TIME }}" | |
| tag_name: "${{ matrix.title }}_${{ matrix.arch }}_${{ env.UTC_TIME }}" | |
| prerelease: false | |
| draft: false | |
| generate_release_notes: false | |
| make_latest: false | |
| body_path: "/tmp/RELEASE_NOTE.md" | |
| files: | | |
| ${{ matrix.file }} | |
| continue-on-error: true | |
| #Build Provenance | |
| - name: Attest Build Provenance | |
| if: env.HAS_RELEASE == 'TRUE' | |
| uses: actions/attest-build-provenance@v2.2.0 | |
| with: | |
| subject-name: "${{ matrix.title }}-${{ matrix.arch }}" | |
| subject-path: ${{ matrix.file }} | |
| show-summary: true | |
| continue-on-error: true |