Skip to content

dottorrent-cli

dottorrent-cli #3

name: dottorrent-cli
on:
workflow_dispatch:
inputs:
name:
description: Name of the torrent file
required: true
default: Firefox Setup 122.0.1
comment:
description: Comment
required: true
default: Firefox Setup 122.0.1 win64 en-US by torrent-webseed-creator
url:
description: URL of the file
required: true
default: https://download-installer.cdn.mozilla.net/pub/firefox/releases/122.0.1/win64/en-US/Firefox%20Setup%20122.0.1.exe
file_name:
description: File name of the file in the torrent
required: true
default: Firefox Setup 122.0.1.exe
maximize_disk_space:
description: Maximize disk space. Check if getting out of disk space error
type: boolean
jobs:
create_torrent:
runs-on: ubuntu-latest
steps:
- name: Maximize disk space
if: inputs.maximize_disk_space
uses: easimon/maximize-build-space@v10
with:
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true
- name: Install dottorrent-cli
run: pipx install dottorrent-cli
- name: Download file
run: aria2c -x 16 -o "${{ inputs.file_name }}" "${{ inputs.url }}"
- name: Create torrent using dottorrent-cli
run: dottorrent --web_seed "${{ inputs.url }}" --source "torrent-webseed-creator" --comment "${{ inputs.comment }}" "${{ inputs.file_name }}" "${{ inputs.name }}.torrent"
- name: Upload torrent file
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.name }}.torrent
compression-level: 0