Refresh Current ISOs #37
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: Refresh Current ISOs | |
on: | |
push: | |
paths: | |
- current-isos.sh | |
schedule: | |
- cron: "40 8 * * *" # 8:40 UTC every day | |
workflow_dispatch: | |
jobs: | |
update-current-isos: | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Generate and upload current-isos.txt | |
shell: bash | |
env: | |
RCLONE_CONFIG_FERAL_TYPE: sftp | |
RCLONE_CONFIG_FERAL_HOST: gaia.feralhosting.com | |
RCLONE_CONFIG_FERAL_USER: ublue | |
RCLONE_CONFIG_FERAL_KEY_FILE: id_ed25519 | |
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y rclone | |
bash current-isos.sh | tee current-isos.txt | |
echo "$SSH_KEY" > id_ed25519 | |
chmod 600 id_ed25519 | |
rclone copy -v ./current-isos.txt FERAL:ublue-torrent-mirror/var | |
- name: Trigger ublue-torrent-manager | |
shell: bash | |
run: | | |
mkdir -p ~/.ssh | |
cp pyinfra/known_hosts ~/.ssh/known_hosts | |
ssh -i id_ed25519 [email protected] bash -c '~/ublue-torrent-mirror/libexec/ublue-torrent-manager.sh' |