♻️🧬 Sync GH Releases Metadata 🧬♻️ #25
This file contains 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: ♻️🧬 Sync GH Releases Metadata 🧬♻️ | |
concurrency: | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "50 1-23/2 * * *" #Every 110 mins | |
jobs: | |
sync: | |
runs-on: ${{ matrix.runner }} | |
timeout-minutes: 10 | |
permissions: | |
contents: write | |
packages: write | |
statuses: read | |
strategy: | |
#max-parallel: 2 | |
fail-fast: false | |
matrix: | |
include: | |
- runner: "ubuntu-24.04-arm" | |
repo: "bincache" | |
gh_repo: "https://huggingface.co/datasets/pkgforge/bincache" | |
script: "https://raw.githubusercontent.com/pkgforge/bincache/refs/heads/main/scripts/github/sync_releases_metadata.sh" | |
- runner: "ubuntu-latest" | |
repo: "bincache" | |
gh_repo: "https://huggingface.co/datasets/pkgforge/bincache" | |
script: "https://raw.githubusercontent.com/pkgforge/bincache/refs/heads/main/scripts/github/sync_releases_metadata.sh" | |
steps: | |
- name: Install Addons | |
run: | | |
#presets | |
set +x ; set +e | |
#-------------# | |
export DEBIAN_FRONTEND="noninteractive" | |
sudo apt update -y -qq | |
sudo apt install 7zip b3sum bc coreutils curl dos2unix fdupes jq git git-lfs moreutils wget util-linux -y -qq | |
sudo apt install 7zip b3sum bc coreutils curl dos2unix fdupes jq git git-lfs moreutils wget util-linux -y -qq | |
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}" | |
#-------------# | |
#Git | |
sudo apt-get install git-lfs -y -qq | |
#-------------# | |
##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: Sync Release [${{ matrix.repo }} ==> ${{ matrix.gh_repo }}/releases/metadata] | |
env: | |
GHCR_TOKEN: "${{ github.token }}" | |
GITHUB_TOKEN: "${{ github.token }}" | |
#GITHUB_TOKEN: "${{ secrets.ADM_GHTOKEN }}" | |
run: | | |
#Presets | |
set +x ; set +e | |
#--------------# | |
curl -qfsSL "${{ matrix.script }}" -o "./sync.sh" | |
dos2unix --quiet "./sync.sh" | |
chmod +x "./sync.sh" | |
bash "./sync.sh" | |
continue-on-error: true |