Skip to content

Instantly share code, notes, and snippets.

View amayra's full-sized avatar
🤔
I may be slow to respond.

Aryma amayra

🤔
I may be slow to respond.
View GitHub Profile
@amayra
amayra / mirror-releases.py
Created October 1, 2024 20:06 — forked from rcarmo/mirror-releases.py
GitHub Release Backup Script
# Use this with a slow cron - I had mine set to run every 24 bours and keep copies of the last 5 releases
from os import environ, listdir, makedirs
from os.path import join, exists, getmtime, isdir
from shutil import rmtree
from json import loads
from asyncio import run, create_task, sleep, create_subprocess_shell
from asyncio.subprocess import PIPE, STDOUT
from aiohttp import ClientSession
from logging import basicConfig, INFO, DEBUG, WARNING, getLogger