-
-
Notifications
You must be signed in to change notification settings - Fork 72
53 lines (48 loc) · 1.76 KB
/
dottorrent-cli.yaml
File metadata and controls
53 lines (48 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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@v7
with:
name: ${{ inputs.name }}
path: ${{ inputs.name }}.torrent
compression-level: 0