-
Notifications
You must be signed in to change notification settings - Fork 16
1370 lines (1300 loc) · 108 KB
/
healthchecks_housekeeping.yaml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
name: 🐧🧹 HealthChecks 🖳🗑️
#MAX_RUNTIME: 02 Minutes */10 * * * *
on:
#push:
workflow_dispatch:
schedule:
# - cron: "45 03 * * *" # 03:45 AM UTC --> 09:30 AM Morning NPT
- cron: "0 */12 * * *" # Every 12 Hrs
env:
GITHUB_TOKEN: "${{ secrets.TOOLPACKS }}"
RCLONE_CF_R2_PUB: "${{ secrets.RCLONE_CF_R2_PUB }}"
R2_PUB_REPO: "https://pub.ajam.dev/repos/Azathothas/Toolpacks"
jobs:
#------------------------------------------------------------------------------------#
check-post:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Debloat Runner
run: |
#Presets
set +x ; set +e
#--------------#
bash <(curl -qfsSL "https://pub.ajam.dev/repos/Azathothas/Arsenal/misc/Github/Runners/Ubuntu/debloat.sh")
continue-on-error: true
- name: Checkout repository
uses: actions/checkout@v4
with:
path: main
filter: "blob:none" #https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- name: Setup Env
run: |
#presets
set +x ; set +e
#tmp
SYSTMP="$(dirname $(mktemp -u))" && export SYSTMP="$SYSTMP"
#GH ENV
echo "SYSTMP=$SYSTMP" >> "$GITHUB_ENV"
#GH Dirs
mkdir -p "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux"
mkdir -p "$GITHUB_WORKSPACE/main/arm64_v8a_Android"
mkdir -p "$GITHUB_WORKSPACE/main/x64_Windows"
mkdir -p "$GITHUB_WORKSPACE/main/x86_64_Linux"
#-------------#
mkdir -p "$HOME/bin"
##Setup rClone
mkdir -p "$HOME/.config/rclone"
echo "${{ secrets.RCLONE_CF_R2_PUB }}" > "$HOME/.config/rclone/rclone.conf"
export RCLONE_STATS="120s" ; echo "RCLONE_STATS=$RCLONE_STATS" >> "$GITHUB_ENV"
##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: Install Addons
run: |
#presets
set +x ; set +e
#-------------#
bash <(curl -qfsSL "https://pub.ajam.dev/repos/Azathothas/Arsenal/misc/Linux/install_dev_tools.sh")
continue-on-error: true
- name: Install Golang
run: |
#presets
set +x ; set +e
#-------------#
pushd "$(mktemp -d)" >/dev/null
echo "yes" | bash <(curl -qfsSL "https://git.io/go-installer")
popd >/dev/null
continue-on-error: true
- name: Install NIX
run: |
#presets
set +x ; set +e
#-------------#
"/nix/nix-installer" uninstall --no-confirm 2>/dev/null
curl -qfsSL "https://install.determinate.systems/nix" | bash -s -- install linux --init none --no-confirm
source "/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh"
sudo chown --recursive "runner" "/nix"
echo "root ALL=(ALL:ALL) ALL" | sudo tee -a "/etc/sudoers"
nix --version && nix-channel --list && nix-channel --update
continue-on-error: true
- name: Install Rust
run: |
#presets
set +x ; set +e
#-------------#
bash <(curl -qfsSL "https://sh.rustup.rs") -y
continue-on-error: true
- name: Install Zig
run: |
#presets
set +x ; set +e
#-------------#
sudo rm "/usr/local/zig" -rf 2>/dev/null ; sudo rm "/usr/local/zig" -rf 2>/dev/null
pushd "$(mktemp -d)" >/dev/null 2>&1 && curl -qfSLJO $(curl -qfsSL "https://ziglang.org/download/index.json" | jq -r '.master | ."x86_64-linux".tarball')
find . -type f -name '*.tar*' -exec tar -xf {} \;
sudo mkdir -p "/usr/local/zig" && sudo mv "$(find . -maxdepth 1 -type d | grep -v '^.$')"/* "/usr/local/zig" ; popd >/dev/null 2>&1
continue-on-error: true
- name: Dos2Unix Everything
run: |
#Presets
set +x ; set +e
#--------------#
cd "$GITHUB_WORKSPACE/main"
find . -type f ! -path "./.git/*" -exec dos2unix {} \; 2>/dev/null
continue-on-error: true
- name: ActionLint
run: |
#Presets
set +x ; set +e
#--------------#
cd "$GITHUB_WORKSPACE/main"
find ".github/workflows" -type f -name "*ml" -exec actionlint {} \;
continue-on-error: true
- name: Shellcheck
run: |
#Presets
set +x ; set +e
#--------------#
cd "$GITHUB_WORKSPACE/main"
find ".github" -type f -name '*.sh' -exec shellcheck --exclude="SC2261" --severity=error "{}" \; 2>/dev/null | tee "${GITHUB_WORKSPACE}/main/.github/shellcheck.txt"
continue-on-error: true
- name: YAMLint
run: |
#Presets
set +x ; set +e
#--------------#
cd "$GITHUB_WORKSPACE/main/.github/scripts/aarch64_Linux/bins"
find . -name '*.yaml' -exec sh -c 'for file; do bins=$(yq .bins[] "$file"); if [ "$(echo "$bins" | wc -l)" -eq 1 ] && [ "$(echo "$bins" | wc -w)" -gt 1 ]; then echo "$file --> $file.invalid"; mv "$file" "$file.invalid" ; fi; done' sh {} +
cd "$GITHUB_WORKSPACE/main/.github/scripts/arm64_v8a_Android/bins"
find . -name '*.yaml' -exec sh -c 'for file; do bins=$(yq .bins[] "$file"); if [ "$(echo "$bins" | wc -l)" -eq 1 ] && [ "$(echo "$bins" | wc -w)" -gt 1 ]; then echo "$file --> $file.invalid"; mv "$file" "$file.invalid" ; fi; done' sh {} +
cd "$GITHUB_WORKSPACE/main/.github/scripts/x86_64_Linux/bins"
find . -name '*.yaml' -exec sh -c 'for file; do bins=$(yq .bins[] "$file"); if [ "$(echo "$bins" | wc -l)" -eq 1 ] && [ "$(echo "$bins" | wc -w)" -gt 1 ]; then echo "$file --> $file.invalid"; mv "$file" "$file.invalid" ; fi; done' sh {} +
cd "$GITHUB_WORKSPACE/main/.github/scripts/x64_Windows/bins"
find . -name '*.yaml' -exec sh -c 'for file; do bins=$(yq .bins[] "$file"); if [ "$(echo "$bins" | wc -l)" -eq 1 ] && [ "$(echo "$bins" | wc -w)" -gt 1 ]; then echo "$file --> $file.invalid"; mv "$file" "$file.invalid" ; fi; done' sh {} +
continue-on-error: true
- name: Generate GO_TARGETS
run: |
#Presets
set +x ; set +e
#--------------#
export PATH="$HOME/bin:$HOME/.cargo/bin:$HOME/.cargo/env:$HOME/.go/bin:$HOME/go/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$HOME/.local/bin:$HOME/miniconda3/bin:$HOME/miniconda3/condabin:/usr/local/zig:/usr/local/zig/lib:/usr/local/zig/lib/include:/usr/local/musl/bin:/usr/local/musl/lib:/usr/local/musl/include:$PATH"
go tool dist list --json | jq -r '["| [GOOS](https://pkg.go.dev/internal/platform) | [GOARCH](https://github.com/golang/go/blob/master/src/go/build/syslist.go) | [CGO_SUPPORT](https://web.archive.org/web/20240614051126/https://medium.com/@pengcheng1222/exploring-cgo-enabled-in-go-23cf5cf2fe88) | [NATIVE](https://gist.github.com/asukakenji/f15ba7e588ac42795f421b48b8aede63) |", "| --- | --- | --- | --- |"] + (map("| \(.GOOS) | \(.GOARCH) | \(.CgoSupported | if . then "✅" else "❌" end) | \(.FirstClass | if . then "✅" else "❌" end) |")) | join("\n")' > "$GITHUB_WORKSPACE/main/Docs/GO_TARGETS.md"
continue-on-error: true
- name: Generate NIX_TARGETS
run: |
#Presets
set +x ; set +e
#--------------#
#https://github.com/NixOS/nixpkgs/blob/master/lib/systems/examples.nix
export PATH="$HOME/bin:$HOME/.cargo/bin:$HOME/.cargo/env:$HOME/.go/bin:$HOME/go/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$HOME/.local/bin:$HOME/miniconda3/bin:$HOME/miniconda3/condabin:/usr/local/zig:/usr/local/zig/lib:/usr/local/zig/lib/include:/usr/local/musl/bin:/usr/local/musl/lib:/usr/local/musl/include:$PATH"
nix-instantiate --eval --strict --expr 'let pkgs = import <nixpkgs> {}; pkgsCross = pkgs.pkgsCross; in builtins.attrNames pkgsCross' | tr -d '[]"' | tr ' ' '\n' | sed '/^\s*$/d' | sed 's/^/pkgsCross./' > "$GITHUB_WORKSPACE/main/Docs/NIX_TARGETS.txt"
continue-on-error: true
- name: Generate RUST_TARGETS
run: |
#Presets
set +x ; set +e
#--------------#
export PATH="$HOME/bin:$HOME/.cargo/bin:$HOME/.cargo/env:$HOME/.go/bin:$HOME/go/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$HOME/.local/bin:$HOME/miniconda3/bin:$HOME/miniconda3/condabin:/usr/local/zig:/usr/local/zig/lib:/usr/local/zig/lib/include:/usr/local/musl/bin:/usr/local/musl/lib:/usr/local/musl/include:$PATH"
rustup target list > "$GITHUB_WORKSPACE/main/Docs/RUST_TARGETS.txt"
continue-on-error: true
- name: Generate ZIG_TARGETS
run: |
#Presets
set +x ; set +e
#--------------#
export PATH="$HOME/bin:$HOME/.cargo/bin:$HOME/.cargo/env:$HOME/.go/bin:$HOME/go/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$HOME/.local/bin:$HOME/miniconda3/bin:$HOME/miniconda3/condabin:/usr/local/zig:/usr/local/zig/lib:/usr/local/zig/lib/include:/usr/local/musl/bin:/usr/local/musl/lib:/usr/local/musl/include:$PATH"
zig targets | jq -r '.libc[]' > "$GITHUB_WORKSPACE/main/Docs/ZIG_TARGETS.txt"
continue-on-error: true
#------------------------------------------------------------------------------------#
- name: rClone BackUp Repo-I ("https://pub.ajam.dev/repos/$GITHUB_REPOSITORY")
run: |
# Presets
set +x ; set +e
#--------------#
#touch "$HOME/.rclone.conf"
echo "${{ secrets.RCLONE_CF_R2_PUB }}" > "$HOME/.rclone.conf"
#copy & chdir to Repo
cp -r "$GITHUB_WORKSPACE/main" "$SYSTMP/REPO" && cd "$SYSTMP/REPO"
#Git pull
git pull origin main --no-edit 2>/dev/null
#Del Bloat
rm -rf "$(pwd)/.git"
# rm -rf "$(pwd)/aarch64_arm64_Linux"
# rm -rf "$(pwd)/arm64_v8a_Android"
# rm -rf "$(pwd)/x86_64_Linux"
# rm -rf "$(pwd)/x64_Windows"
#Upload to Pub
wait ; echo
echo -e "[+] Syncing $GITHUB_REPOSITORY to pub.ajam.dev/repos/$GITHUB_REPOSITORY \n"
rclone sync "." "r2:/pub/repos/$GITHUB_REPOSITORY/" --user-agent="$USER_AGENT" --buffer-size="100M" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --check-first --checksum --copy-links --fast-list --progress
#Get JQ Module to convert size : https://users.aalto.fi/~tontti/posts/jq-and-human-readable-bytes/
curl -qfsSL "https://pub.ajam.dev/utils/devscripts/jq/to_human_bytes.jq" -o "./to_human_bytes.jq"
##Scripts_aarch64_Linux
rclone lsjson --fast-list "r2:/pub/repos/Azathothas/Toolpacks/.github/scripts/aarch64_Linux/bins/" --exclude="*.yaml" | jq -r 'include "./to_human_bytes" ; .[] | select(.IsDir == false) | {name: (.Name), update_date: (.ModTime | split(".")[0]), source_url: "https://pub.ajam.dev/repos/Azathothas/Toolpacks/.github/scripts/aarch64_Linux/bins/\(.Path)"}' | jq . > "./metadata.json.tmp_aarch64_Linux" &
##Scripts_arm64_v8a_Android
rclone lsjson --fast-list "r2:/pub/repos/Azathothas/Toolpacks/.github/scripts/arm64_v8a_Android/bins/" --exclude="*.yaml" | jq -r 'include "./to_human_bytes" ; .[] | select(.IsDir == false) | {name: (.Name), update_date: (.ModTime | split(".")[0]), source_url: "https://pub.ajam.dev/repos/Azathothas/Toolpacks/.github/scripts/arm64_v8a_Android/bins/\(.Path)"}' | jq . > "./metadata.json.tmp_arm64_v8a_Android" &
##Scripts_x86_64_Linux
rclone lsjson --fast-list "r2:/pub/repos/Azathothas/Toolpacks/.github/scripts/x86_64_Linux/bins/" --exclude="*.yaml" | jq -r 'include "./to_human_bytes" ; .[] | select(.IsDir == false) | {name: (.Name), update_date: (.ModTime | split(".")[0]), source_url: "https://pub.ajam.dev/repos/Azathothas/Toolpacks/.github/scripts/x86_64_Linux/bins/\(.Path)"}' | jq . > "./metadata.json.tmp_x86_64_Linux" &
##Scripts_x64_Windows
rclone lsjson --fast-list "r2:/pub/repos/Azathothas/Toolpacks/.github/scripts/x64_Windows/bins/" --exclude="*.yaml" | jq -r 'include "./to_human_bytes" ; .[] | select(.IsDir == false) | {name: (.Name), update_date: (.ModTime | split(".")[0]), source_url: "https://pub.ajam.dev/repos/Azathothas/Toolpacks/.github/scripts/x64_Windows/bins/\(.Path)"}' | jq . > "./metadata.json.tmp_x64_Windows" &
##Clean Pretty Formatted
wait ; echo
echo "[" $(cat metadata.json.tmp_aarch64_Linux | tr '\n' ' ' | sed 's/}/},/g' | sed '$ s/,$//') "]" | sed '$s/,[[:space:]]*\]/\]/' | jq . | tee "./metadata.json_aarch64_Linux" &
echo "[" $(cat metadata.json.tmp_arm64_v8a_Android | tr '\n' ' ' | sed 's/}/},/g' | sed '$ s/,$//') "]" | sed '$s/,[[:space:]]*\]/\]/' | jq . | tee "./metadata.json_arm64_v8a_Android" &
echo "[" $(cat metadata.json.tmp_x86_64_Linux | tr '\n' ' ' | sed 's/}/},/g' | sed '$ s/,$//') "]" | sed '$s/,[[:space:]]*\]/\]/' | jq . | tee "./metadata.json_x86_64_Linux" &
echo "[" $(cat metadata.json.tmp_x64_Windows | tr '\n' ' ' | sed 's/}/},/g' | sed '$ s/,$//') "]" | sed '$s/,[[:space:]]*\]/\]/' | jq . | tee "./metadata.json_x64_Windows" &
##Update Metadata
wait ; echo
rclone copyto --checksum "./metadata.json_aarch64_Linux" "r2:/pub/repos/Azathothas/Toolpacks/.github/scripts/aarch64_Linux/bins/metadata.json" &
rclone copyto --checksum "./metadata.json_arm64_v8a_Android" "r2:/pub/repos/Azathothas/Toolpacks/.github/scripts/arm64_v8a_Android/bins/metadata.json" &
rclone copyto --checksum "./metadata.json_x86_64_Linux" "r2:/pub/repos/Azathothas/Toolpacks/.github/scripts/x86_64_Linux/bins/metadata.json" &
rclone copyto --checksum "./metadata.json_x64_Windows" "r2:/pub/repos/Azathothas/Toolpacks/.github/scripts/x64_Windows/bins/metadata.json" &
##Update Repo
wait ; echo
cat "./metadata.json_aarch64_Linux" > "$GITHUB_WORKSPACE/main/.github/scripts/aarch64_Linux/bins/metadata.json"
cat "./metadata.json_arm64_v8a_Android" > "$GITHUB_WORKSPACE/main/.github/scripts/arm64_v8a_Android/bins/metadata.json"
cat "./metadata.json_x86_64_Linux" > "$GITHUB_WORKSPACE/main/.github/scripts/x86_64_Linux/bins/metadata.json"
cat "./metadata.json_x64_Windows" > "$GITHUB_WORKSPACE/main/.github/scripts/x64_Windows/bins/metadata.json"
continue-on-error: true
#------------------------------------------------------------------------------------#
#-----------------------------------------------------#
#-----------------------------------------------------#
- name: Parse ("bin.ajam.dev/arm64_v8a_Android/") Bins
run: |
#Presets
set +x ; set +e
#--------------#
#Fetch from r2
#Copy to $GITHUB_WORKSPACE/main/arm64_v8a_Android
rclone copyto --checksum "r2:/bin/arm64_v8a_Android/BLAKE3SUM.txt" "$GITHUB_WORKSPACE/main/arm64_v8a_Android/BLAKE3SUM.txt" 2>/dev/null
rclone copyto --checksum "r2:/bin/arm64_v8a_Android/FILE.txt" "$GITHUB_WORKSPACE/main/arm64_v8a_Android/FILE.txt" 2>/dev/null
rclone copyto --checksum "r2:/bin/arm64_v8a_Android/SIZE.txt" "$GITHUB_WORKSPACE/main/arm64_v8a_Android/SIZE.txt" 2>/dev/null
echo '```mathematica' > "$GITHUB_WORKSPACE/main/arm64_v8a_Android/SIZE.md" 2>/dev/null
cat "$GITHUB_WORKSPACE/main/arm64_v8a_Android/SIZE.txt" >> "$GITHUB_WORKSPACE/main/arm64_v8a_Android/SIZE.md" 2>/dev/null
echo '```' >> "$GITHUB_WORKSPACE/main/arm64_v8a_Android/SIZE.md" 2>/dev/null
rclone copyto --checksum "r2:/bin/arm64_v8a_Android/SHA256SUM.txt" "$GITHUB_WORKSPACE/main/arm64_v8a_Android/SHA256SUM.txt" 2>/dev/null
rclone copyto --checksum "r2:/bin/arm64_v8a_Android/METADATA.json" "$GITHUB_WORKSPACE/main/arm64_v8a_Android/METADATA.json" 2>/dev/null
continue-on-error: true
#-----------------------------------------------------#
#-----------------------------------------------------#
- name: Parse ("bin.ajam.dev/aarch64_arm64_Linux/") Bins
run: |
#Presets
set +x ; set +e
#--------------#
#Fetch from r2
#Copy to $GITHUB_WORKSPACE/main/aarch64_arm64_Linux
rclone copyto --checksum "r2:/bin/aarch64_arm64_Linux/BLAKE3SUM.txt" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BLAKE3SUM.txt" 2>/dev/null
rclone copyto --checksum "r2:/bin/aarch64_arm64_Linux/FILE.txt" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/FILE.txt" 2>/dev/null
rclone copyto --checksum "r2:/bin/aarch64_arm64_Linux/METADATA.AIO.json" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/METADATA.AIO.json" 2>/dev/null
rclone copyto --checksum "r2:/bin/aarch64_arm64_Linux/METADATA.AIO.min.json" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/METADATA.AIO.min.json" 2>/dev/null
rclone copyto --checksum "r2:/bin/aarch64_arm64_Linux/METADATA.AIO.toml" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/METADATA.AIO.toml" 2>/dev/null
rclone copyto --checksum "r2:/bin/aarch64_arm64_Linux/METADATA.AIO.yaml" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/METADATA.AIO.yaml" 2>/dev/null
rclone copyto --checksum "r2:/bin/aarch64_arm64_Linux/SIZE.txt" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/SIZE.txt" 2>/dev/null
echo '```mathematica' > "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/SIZE.md" 2>/dev/null
cat "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/SIZE.txt" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/SIZE.md" 2>/dev/null
echo '```' >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/SIZE.md" 2>/dev/null
rclone copyto --checksum "r2:/bin/aarch64_arm64_Linux/SHA256SUM.txt" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/SHA256SUM.txt" 2>/dev/null
continue-on-error: true
#-----------------------------------------------------#
#-----------------------------------------------------#
- name: Parse ("bin.ajam.dev/x86_64_Linux/") Bins
run: |
#Presets
set +x ; set +e
#--------------#
#Fetch from r2
#Copy to $GITHUB_WORKSPACE/main/x86_64_Linux
rclone copyto --checksum "r2:/bin/x86_64_Linux/BLAKE3SUM.txt" "$GITHUB_WORKSPACE/main/x86_64_Linux/BLAKE3SUM.txt" 2>/dev/null
rclone copyto --checksum "r2:/bin/x86_64_Linux/FILE.txt" "$GITHUB_WORKSPACE/main/x86_64_Linux/FILE.txt" 2>/dev/null
rclone copyto --checksum "r2:/bin/x86_64_Linux/METADATA.AIO.json" "$GITHUB_WORKSPACE/main/x86_64_Linux/METADATA.AIO.json" 2>/dev/null
rclone copyto --checksum "r2:/bin/x86_64_Linux/METADATA.AIO.min.json" "$GITHUB_WORKSPACE/main/x86_64_Linux/METADATA.AIO.min.json" 2>/dev/null
rclone copyto --checksum "r2:/bin/x86_64_Linux/METADATA.AIO.toml" "$GITHUB_WORKSPACE/main/x86_64_Linux/METADATA.AIO.toml" 2>/dev/null
rclone copyto --checksum "r2:/bin/x86_64_Linux/METADATA.AIO.yaml" "$GITHUB_WORKSPACE/main/x86_64_Linux/METADATA.AIO.yaml" 2>/dev/null
rclone copyto --checksum "r2:/bin/x86_64_Linux/SIZE.txt" "$GITHUB_WORKSPACE/main/x86_64_Linux/SIZE.txt" 2>/dev/null
echo '```mathematica' > "$GITHUB_WORKSPACE/main/x86_64_Linux/SIZE.md" 2>/dev/null
cat "$GITHUB_WORKSPACE/main/x86_64_Linux/SIZE.txt" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/SIZE.md" 2>/dev/null
echo '```' >> "$GITHUB_WORKSPACE/main/x86_64_Linux/SIZE.md" 2>/dev/null
rclone copyto --checksum "r2:/bin/x86_64_Linux/SHA256SUM.txt" "$GITHUB_WORKSPACE/main/x86_64_Linux/SHA256SUM.txt" 2>/dev/null
continue-on-error: true
#-----------------------------------------------------#
#-----------------------------------------------------#
- name: Parse ("bin.ajam.dev/x64_Windows/") Bins
run: |
#Presets
set +x ; set +e
#--------------#
#Fetch from r2
#Copy to $GITHUB_WORKSPACE/main/x64_Windows
rclone copyto --checksum "r2:/bin/x64_Windows/BLAKE3SUM.txt" "$GITHUB_WORKSPACE/main/x64_Windows/BLAKE3SUM.txt" 2>/dev/null
rclone copyto --checksum "r2:/bin/x64_Windows/FILE.txt" "$GITHUB_WORKSPACE/main/x64_Windows/FILE.txt" 2>/dev/null
rclone copyto --checksum "r2:/bin/x64_Windows/SIZE.txt" "$GITHUB_WORKSPACE/main/x64_Windows/SIZE.txt" 2>/dev/null
echo '```mathematica' > "$GITHUB_WORKSPACE/main/x64_Windows/SIZE.md" 2>/dev/null
cat "$GITHUB_WORKSPACE/main/x64_Windows/SIZE.txt" >> "$GITHUB_WORKSPACE/main/x64_Windows/SIZE.md" 2>/dev/null
echo '```' >> "$GITHUB_WORKSPACE/main/x64_Windows/SIZE.md" 2>/dev/null
rclone copyto --checksum "r2:/bin/x64_Windows/SHA256SUM.txt" "$GITHUB_WORKSPACE/main/x64_Windows/SHA256SUM.txt" 2>/dev/null
continue-on-error: true
#-----------------------------------------------------#
#------------------------------------------------------------------------------------#
- name: Generate Repo Metadata (git-sizer)
run: |
#Presets
set +x ; set +e
#--------------#
cd "$GITHUB_WORKSPACE/main"
#Dust sizes
echo '```mathematica' > "$GITHUB_WORKSPACE/main/.github/SIZE.md"
dust -b -c -i -r -n 99999999 "$GITHUB_WORKSPACE/main" | tee -a "$GITHUB_WORKSPACE/main/.github/SIZE.md"
dust -b -c -i -r -n 99999999 "$GITHUB_WORKSPACE/main" | tee "$GITHUB_WORKSPACE/main/.github/SIZE.txt"
echo '```' >> "$GITHUB_WORKSPACE/main/.github/SIZE.md"
continue-on-error: true
- name: Parse Build Logs (aarch64_arm64_Linux)
run: |
#Presets
set +x ; set +e ; ulimit -S -s unlimited ; ulimit -f unlimited 2>/dev/null
#--------------#
cd "$GITHUB_WORKSPACE/main"
#--------------------#
##aarch64_arm64_Linux##
curl -qfsSL "https://bin.ajam.dev/aarch64_arm64_Linux/BUILD.BIN.log.txt" -o "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD.BIN.log.txt"
#Secrets & Tokens
sed -i '/.*github_pat.*/Id' "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD.BIN.log.txt"
sed -i '/.*ghp_.*/Id' "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD.BIN.log.txt"
sed -i '/.*access_key_id.*/Id' "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD.BIN.log.txt"
sed -i '/.*secret_access_key.*/Id' "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD.BIN.log.txt"
sed -i '/.*cloudflarestorage.*/Id' "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD.BIN.log.txt"
echo -e '```mathematica' > "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
#Broken GH Repos
echo -e "\n[-] Authentication failed --> # Invalid/Deleted GH Repos\n" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
grep -B5 -A3 -in ".* Authentication failed .*" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD.BIN.log.txt" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
#Eget Fails
echo -e "\n\n[-] asset * not found --> # Eget failed to find that --asset\n" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
grep -B5 -in "asset .* not found" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD.BIN.log.txt" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
#Failed URLs
echo -e "\n\n[-] Could not resolve host --> # Curl Failed to connect, usually Invalid URL\n" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
awk '/Could not resolve host/{print prev; print; found=1} {prev=$0} /^\[+\]/{exit} END{if (!found) print prev}' "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD.BIN.log.txt" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
#Failed Installs
echo -e "\n\n[-] command not found --> # Something failed to Install\n" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
grep -in "command not found" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD.BIN.log.txt" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
#Dynamically Linked
echo -e "\n\n[-] Dynamically Linked --> # Not Statically Linked\n" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
grep -in "dynamically linked" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/FILE.txt" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
#Not correct binary
echo -e "\n\n[-] Incorrect Arch --> # Not for aarch64\n" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
grep -ivn "aarch64\|text" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/FILE.txt" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
#Build Failures
echo -e "\n\n[-] No such file or directory # Usually Because Build Failures\n" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
grep -in "No such file or directory" "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD.BIN.log.txt" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
#Empty Bins
echo -e "\n\n[-] Empty (0 Sized) Bins # Usually Because Symlinks\n" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
jq -r '.[] | select(.Size == "0 B") | "\(.Name) --> \(.Size)"' "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/METADATA.json" >> "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
#END
echo -e '```' "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BUILD_ERROR.log.md"
continue-on-error: true
- name: Parse Build Logs (x86_64_Linux)
run: |
#Presets
set +x ; set +e ; ulimit -S -s unlimited ; ulimit -f unlimited 2>/dev/null
#--------------#
cd "$GITHUB_WORKSPACE/main"
#--------------------#
##x86_64_Linux##
#Secrets & Tokens
curl -qfsSL "https://bin.ajam.dev/x86_64_Linux/BUILD.BIN.log.txt" -o "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD.BIN.log.txt"
sed -i '/.*github_pat.*/Id' "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD.BIN.log.txt"
sed -i '/.*ghp_.*/Id' "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD.BIN.log.txt"
sed -i '/.*access_key_id.*/Id' "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD.BIN.log.txt"
sed -i '/.*secret_access_key.*/Id' "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD.BIN.log.txt"
sed -i '/.*cloudflarestorage.*/Id' "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD.BIN.log.txt"
echo -e '```mathematica' > "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
#Broken GH Repos
echo -e "\n[-] Authentication failed --> # Invalid/Deleted GH Repos\n" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
grep -B5 -A3 -in ".* Authentication failed .*" "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD.BIN.log.txt" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
#Eget Fails
echo -e "\n\n[-] asset * not found --> # Eget failed to find that --asset\n" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
grep -B5 -in "asset .* not found" "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD.BIN.log.txt" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
#Failed URLs
echo -e "\n\n[-] Could not resolve host --> # Curl Failed to connect, usually Invalid URL\n" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
awk '/Could not resolve host/{print prev; print; found=1} {prev=$0} /^\[+\]/{exit} END{if (!found) print prev}' "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD.BIN.log.txt" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
#Failed Installs
echo -e "\n\n[-] command not found --> # Something failed to Install\n" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
grep -in "command not found" "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD.BIN.log.txt" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
#Dynamically Linked
echo -e "\n\n[-] Dynamically Linked --> # Not Statically Linked\n" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
grep -in "dynamically linked" "$GITHUB_WORKSPACE/main/x86_64_Linux/FILE.txt" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
#Not correct binary
echo -e "\n\n[-] Incorrect Arch --> # Not for x86_64\n" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
grep -ivn "x86-64\|text" "$GITHUB_WORKSPACE/main/x86_64_Linux/FILE.txt" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
#Broken Builds
echo -e "\n\n[-] No such file or directory # Usually Because Build Failures\n" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
grep -in "No such file or directory" "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD.BIN.log.txt" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
#Empty Bins
echo -e "\n\n[-] Empty (0 Sized) Bins # Usually Because Symlinks\n" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
jq -r '.[] | select(.Size == "0 B") | "\(.Name) --> \(.Size)"' "$GITHUB_WORKSPACE/main/x86_64_Linux/METADATA.json" >> "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
#END
echo -e '```' "$GITHUB_WORKSPACE/main/x86_64_Linux/BUILD_ERROR.log.md"
continue-on-error: true
- name: Generate Markdown (Main README.md)
run: |
#Presets
set +x ; set +e ; ulimit -S -s unlimited ; ulimit -f unlimited 2>/dev/null
#--------------#
cd "$GITHUB_WORKSPACE/main"
#Generate $GITHUB_WORKSPACE/main/README.md
cat "$GITHUB_WORKSPACE/main/INFO.md" > "$GITHUB_WORKSPACE/main/README.md"
##bin.ajam.dev/arm64_v8a_Android/
unset MAIN_N BASE_N TOTAL_PACKAGES
MAIN_N="$(curl -qfsSL "https://bin.ajam.dev/METADATA.json" | jq '.[] | select(.host == "arm64-v8a-Android") | .main' | jq -r '.[].name' | sort -u | wc -l)" && export MAIN_N="${MAIN_N}"
BASE_N="$(curl -qfsSL "https://bin.ajam.dev/METADATA.json" | jq '.[] | select(.host == "arm64-v8a-Android") | .baseutils' | jq -r '.[].name' | sort -u | wc -l)" && export BASE_N="${BASE_N}"
export TOTAL_PACKAGES="$((MAIN_N + BASE_N))" && export TOTAL_PACKAGES="$TOTAL_PACKAGES"
sed "s/PLACEHOLDER_arm64_v8a_Android/$TOTAL_PACKAGES/g" -i "$GITHUB_WORKSPACE/main/README.md"
##bin.ajam.dev/aarch64_arm64_Linux
unset MAIN_N BASE_N TOTAL_PACKAGES
MAIN_N="$(curl -qfsSL "https://bin.ajam.dev/METADATA.json" | jq '.[] | select(.host == "aarch64-Linux") | .main' | jq -r '.[].name' | sort -u | wc -l)" && export MAIN_N="${MAIN_N}"
BASE_N="$(curl -qfsSL "https://bin.ajam.dev/METADATA.json" | jq '.[] | select(.host == "aarch64-Linux") | .baseutils' | jq -r '.[].name' | sort -u | wc -l)" && export BASE_N="${BASE_N}"
export TOTAL_PACKAGES="$((MAIN_N + BASE_N))" && export TOTAL_PACKAGES="$TOTAL_PACKAGES"
sed "s/PLACEHOLDER_aarch64_arm64_Linux/$TOTAL_PACKAGES/g" -i "$GITHUB_WORKSPACE/main/README.md"
##bin.ajam.dev/x86_64_Linux/
unset MAIN_N BASE_N TOTAL_PACKAGES
MAIN_N="$(curl -qfsSL "https://bin.ajam.dev/METADATA.json" | jq '.[] | select(.host == "x86_64-Linux") | .main' | jq -r '.[].name' | sort -u | wc -l)" && export MAIN_N="${MAIN_N}"
BASE_N="$(curl -qfsSL "https://bin.ajam.dev/METADATA.json" | jq '.[] | select(.host == "x86_64-Linux") | .baseutils' | jq -r '.[].name' | sort -u | wc -l)" && export BASE_N="${BASE_N}"
export TOTAL_PACKAGES="$((MAIN_N + BASE_N))" && export TOTAL_PACKAGES="$TOTAL_PACKAGES"
sed "s/PLACEHOLDER_x86_64_Linux/$TOTAL_PACKAGES/g" -i "$GITHUB_WORKSPACE/main/README.md"
##bin.ajam.dev/x64_Windows/
unset MAIN_N BASE_N TOTAL_PACKAGES
MAIN_N="$(curl -qfsSL "https://bin.ajam.dev/METADATA.json" | jq '.[] | select(.host == "AMD64-Windows_NT") | .main' | jq -r '.[].name' | sort -u | wc -l)" && export MAIN_N="${MAIN_N}"
BASE_N="$(curl -qfsSL "https://bin.ajam.dev/METADATA.json" | jq '.[] | select(.host == "AMD64-Windows_NT") | .baseutils' | jq -r '.[].name' | sort -u | wc -l)" && export BASE_N="${BASE_N}"
export TOTAL_PACKAGES="$((MAIN_N + BASE_N))" && export TOTAL_PACKAGES="$TOTAL_PACKAGES"
sed "s/PLACEHOLDER_x64_Windows/$TOTAL_PACKAGES/g" -i "$GITHUB_WORKSPACE/main/README.md"
continue-on-error: true
- name: Scrape Public Issues
run: |
#Presets
set +x ; set +e
#--------------#
#https://docs.github.com/en/rest/issues/issues
export DATE_CUTOFF="2024-00-00T00:00:00Z"
TEMP_ISSUES="$(mktemp -d)" && export TEMP_ISSUES="${TEMP_ISSUES}"
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 -e "\n[+] Using Temp Dir : ${TEMP_ISSUES}"
#Fetch: `static binary`
(for page in {1..10}; do
echo -e "\n[+] GH API: Static Binary ($page/10)\n"
curl -qfsSL -A "$USER_AGENT" "https://api.github.com/search/issues?q=static+binary+state:open+is:issue&filter=all&since=${DATE_CUTOFF}&sort=created&direction=desc&per_page=100&page=$page" -H "Authorization: Bearer ${GITHUB_TOKEN}" | jq -r '.items | sort_by(.created_at)[] | "\(.created_at // "NA") \(.title // "NA") --> \(.html_url // "NA") (\(.user.login // "NA"))"' | tee -a "${TEMP_ISSUES}/$(openssl rand -hex 3).txt"
sleep 2
done) &
#Fetch: `static build`
(for page in {1..10}; do
echo -e "\n[+] GH API: Static Build ($page/10)\n"
curl -qfsSL -A "$USER_AGENT" "https://api.github.com/search/issues?q=static+build+state:open+is:issue&filter=all&since=${DATE_CUTOFF}&sort=created&direction=desc&per_page=100&page=$page" -H "Authorization: Bearer ${GITHUB_TOKEN}" | jq -r '.items | sort_by(.created_at)[] | "\(.created_at // "NA") \(.title // "NA") --> \(.html_url // "NA") (\(.user.login // "NA"))"' | tee -a "${TEMP_ISSUES}/$(openssl rand -hex 3).txt"
sleep 2
done) &
wait ; echo
#Fetch: `static compile`
(for page in {1..10}; do
echo -e "\n[+] GH API: Static Compile ($page/10)\n"
curl -qfsSL -A "$USER_AGENT" "https://api.github.com/search/issues?q=static+compile+state:open+is:issue&filter=all&since=${DATE_CUTOFF}&sort=created&direction=desc&per_page=100&page=$page" -H "Authorization: Bearer ${GITHUB_TOKEN}" | jq -r '.items | sort_by(.created_at)[] | "\(.created_at // "NA") \(.title // "NA") --> \(.html_url // "NA") (\(.user.login // "NA"))"' | tee -a "${TEMP_ISSUES}/$(openssl rand -hex 3).txt"
sleep 2
done) &
#Fetch: `musl binary`
(for page in {1..10}; do
echo -e "\n[+] GH API: MUSL Binary ($page/10)\n"
curl -qfsSL -A "$USER_AGENT" "https://api.github.com/search/issues?q=musl+binary+state:open+is:issue&filter=all&since=${DATE_CUTOFF}&sort=created&direction=desc&per_page=100&page=$page" -H "Authorization: Bearer ${GITHUB_TOKEN}" | jq -r '.items | sort_by(.created_at)[] | "\(.created_at // "NA") \(.title // "NA") --> \(.html_url // "NA") (\(.user.login // "NA"))"' | tee -a "${TEMP_ISSUES}/$(openssl rand -hex 3).txt"
sleep 2
done) &
wait ; echo
#Fetch: `musl build`
(for page in {1..10}; do
echo -e "\n[+] GH API: MUSL Build ($page/10)\n"
curl -qfsSL -A "$USER_AGENT" "https://api.github.com/search/issues?q=musl+build+state:open+is:issue&filter=all&since=${DATE_CUTOFF}&sort=created&direction=desc&per_page=100&page=$page" -H "Authorization: Bearer ${GITHUB_TOKEN}" | jq -r '.items | sort_by(.created_at)[] | "\(.created_at // "NA") \(.title // "NA") --> \(.html_url // "NA") (\(.user.login // "NA"))"' | tee -a "${TEMP_ISSUES}/$(openssl rand -hex 3).txt"
sleep 2
done) &
#Fetch: `musl compile`
(for page in {1..10}; do
echo -e "\n[+] GH API: MUSL Compile ($page/10)\n"
curl -qfsSL -A "$USER_AGENT" "https://api.github.com/search/issues?q=musl+compile+state:open+is:issue&filter=all&since=${DATE_CUTOFF}&sort=created&direction=desc&per_page=100&page=$page" -H "Authorization: Bearer ${GITHUB_TOKEN}" | jq -r '.items | sort_by(.created_at)[] | "\(.created_at // "NA") \(.title // "NA") --> \(.html_url // "NA") (\(.user.login // "NA"))"' | tee -a "${TEMP_ISSUES}/$(openssl rand -hex 3).txt"
sleep 2
done) &
wait ; echo
#Fetch: `release binary`
(for page in {1..10}; do
echo -e "\n[+] GH API: Release Binary ($page/10)\n"
curl -qfsSL -A "$USER_AGENT" "https://api.github.com/search/issues?q=release+binary+state:open+is:issue&filter=all&since=${DATE_CUTOFF}&sort=created&direction=desc&per_page=100&page=$page" -H "Authorization: Bearer ${GITHUB_TOKEN}" | jq -r '.items | sort_by(.created_at)[] | "\(.created_at // "NA") \(.title // "NA") --> \(.html_url // "NA") (\(.user.login // "NA"))"' | tee -a "${TEMP_ISSUES}/$(openssl rand -hex 3).txt"
sleep 2
done) &
#Fetch: `release static`
(for page in {1..10}; do
echo -e "\n[+] GH API: Release Binary ($page/10)\n"
curl -qfsSL -A "$USER_AGENT" "https://api.github.com/search/issues?q=release+static+state:open+is:issue&filter=all&since=${DATE_CUTOFF}&sort=created&direction=desc&per_page=100&page=$page" -H "Authorization: Bearer ${GITHUB_TOKEN}" | jq -r '.items | sort_by(.created_at)[] | "\(.created_at // "NA") \(.title // "NA") --> \(.html_url // "NA") (\(.user.login // "NA"))"' | tee -a "${TEMP_ISSUES}/$(openssl rand -hex 3).txt"
sleep 2
done) &
wait ; echo
#Sort
find "${TEMP_ISSUES}" -name "*.txt" -exec cat {} + | grep '^[0-9]' | grep -v '\[bot\])' | sort --unique --reverse -o "$GITHUB_WORKSPACE/main/.github/pub_issues.txt"
#find "${TEMP_ISSUES}" -name "*.txt" -exec cat {} + | grep '^[0-9]' | grep -v '\[bot\])' | sort --numeric-sort --reverse --unique -o "$GITHUB_WORKSPACE/main/.github/pub_issues.txt"
#find "${TEMP_ISSUES}" -name "*.txt" -exec cat {} + | grep '^[0-9]' | grep -v '\[bot\])' | sort --version-sort --reverse --unique -o "$GITHUB_WORKSPACE/main/.github/pub_issues.txt"
continue-on-error: true
#- name: Ensure Healthy Commit Nums (RESET ON >= 1000)
# run: |
# #Presets
# set +x ; set +e
# #--------------#
# pushd "$(mktemp -d)" > /dev/null 2>&1 && git clone --filter="blob:none" "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
# cd "$(find . -maxdepth 1 -type d -exec basename {} \; | grep -Ev '^\.$' | xargs -I {} realpath {})"
# CLONED_DIR="$(realpath .)" && export CLONED_DIR="$CLONED_DIR"
# COMMIT_NUMS="$(git rev-list --count HEAD)" && export COMMIT_NUMS="$COMMIT_NUMS"
# popd > /dev/null 2>&1 ; rm -rf "$CLONED_DIR" 2>/dev/null
# cd "$GITHUB_WORKSPACE/main"
# if [ "$COMMIT_NUMS" -gt 1000 ]; then
# echo -e "\n[+] Total number of commits exceeds 1000. ($COMMIT_NUMS)\n"
# cd "$GITHUB_WORKSPACE/main"
# git config "user.name" "Azathothas"
# git config "user.email" "[email protected]"
# git checkout --orphan temp
# git add --all --verbose && git commit -m "Purge (Re:Init)"
# git branch -D "main"
# git branch -m "main"
# git push --set-upstream origin main --force
# echo "RESET_HISTORY=YES" >> "$GITHUB_ENV"
# else
# echo -e "\n[+] Total number of commits looks healthy. ($COMMIT_NUMS)\n"
# echo "RESET_HISTORY=NO" >> "$GITHUB_ENV"
# fi
# pushd "$GITHUB_WORKSPACE/main" >/dev/null 2>&1 && git pull origin main && popd >/dev/null 2>&1
# continue-on-error: true
- name: Get DateTime
run: |
# Date Time
NEPALI_TIME=$(TZ='Asia/Kathmandu' date +'%Y-%m-%d (%I:%M:%S %p)')
echo "NEPALI_TIME=$NEPALI_TIME" >> $GITHUB_ENV
continue-on-error: true
# - name: Git Pull
# run: |
# cd "$GITHUB_WORKSPACE/main" && git pull origin main
# continue-on-error: true
- uses: stefanzweifel/git-auto-commit-action@v5
with:
repository: ./main
commit_user_name: Azathothas # defaults to "github-actions[bot]"
commit_user_email: [email protected] # defaults to "41898282+github-actions[bot]@users.noreply.github.com"
commit_message: "✅ Updated (Metadata) 🛍️ <-- ${{ env.NEPALI_TIME }} ⌚"
#push_options: '--force'
continue-on-error: true
#-----------------------------------------------------#
- name: rClone Generate Metadata (MAIN)
run: |
# Presets
set +x ; set +e
#--------------#
#touch "$HOME/.rclone.conf"
echo "${{ secrets.RCLONE_CF_R2_PUB }}" > "$HOME/.rclone.conf"
#Get JQ Module to convert size : https://users.aalto.fi/~tontti/posts/jq-and-human-readable-bytes/
curl -qfsSL "https://pub.ajam.dev/utils/devscripts/jq/to_human_bytes.jq" -o "./to_human_bytes.jq"
#--------------------#
##arm64_v8a_Android##
rclone lsjson --fast-list "r2:/bin/arm64_v8a_Android/" | jq -r 'include "./to_human_bytes" ; .[] | select(.Size != 0 and .Size != -1 and (.Name | test("\\.(7z|ascii|bz2|gz|jq|json|log|md|png|rar|svg|tar|tgz|tmp|txt|upx|zip)$") | not)) | {name: (.Name), build_date: (.ModTime | split(".")[0]), build_log, build_script, b3sum, description, download_url: "https://bin.ajam.dev/arm64_v8a_Android/\(.Path)", extra_bins, note, sha256, size: (.Size | tonumber | bytes), repo_url, web_url}' | jq -s 'sort_by(.name)' | jq '.[]' > "./metadata.json.tmp_arm64_v8a_Android" &
##aarch64_arm64_Linux##
rclone lsjson --fast-list "r2:/bin/aarch64_arm64_Linux/" | jq -r 'include "./to_human_bytes" ; .[] | select(.Size != 0 and .Size != -1 and (.Name | test("\\.(7z|ascii|bz2|gz|jq|json|log|md|png|rar|svg|tar|tgz|tmp|txt|upx|zip)$") | not)) | {name: (.Name), build_date: (.ModTime | split(".")[0]), build_log, build_script, b3sum, description, download_url: "https://bin.ajam.dev/aarch64_arm64_Linux/\(.Path)", extra_bins, note, sha256, size: (.Size | tonumber | bytes), repo_url, web_url}' | jq -s 'sort_by(.name)' | jq '.[]' > "./metadata.json.tmp_aarch64_arm64_Linux" &
##x86_64_Linux##
rclone lsjson --fast-list "r2:/bin/x86_64_Linux/" | jq -r 'include "./to_human_bytes" ; .[] | select(.Size != 0 and .Size != -1 and (.Name | test("\\.(7z|ascii|bz2|gz|jq|json|log|md|png|rar|svg|tar|tgz|tmp|txt|upx|zip)$") | not)) | {name: (.Name), build_date: (.ModTime | split(".")[0]), build_log, build_script, b3sum, description, download_url: "https://bin.ajam.dev/x86_64_Linux/\(.Path)", extra_bins, note, sha256, size: (.Size | tonumber | bytes), repo_url, web_url}' | jq -s 'sort_by(.name)' | jq '.[]' > "./metadata.json.tmp_x86_64_Linux" &
##x64_Windows##
rclone lsjson --fast-list "r2:/bin/x64_Windows/" | jq -r 'include "./to_human_bytes" ; .[] | select(.Size != 0 and .Size != -1 and (.Name | test("\\.(7z|ascii|bz2|gz|jq|json|log|md|png|rar|svg|tar|tgz|tmp|txt|upx|zip)$") | not)) | {name: (.Name), build_date: (.ModTime | split(".")[0]), build_log, build_script, b3sum, description, download_url: "https://bin.ajam.dev/x64_Windows/\(.Path)", extra_bins, note, sha256, size: (.Size | tonumber | bytes), repo_url, web_url}' | jq -s 'sort_by(.name)' | jq '.[]' > "./metadata.json.tmp_x64_Windows" &
##Clean Pretty Formatted
wait ; echo
echo "[" $(cat metadata.json.tmp_arm64_v8a_Android | tr '\n' ' ' | sed 's/}/},/g' | sed '$ s/,$//') "]" | sed '$s/,[[:space:]]*\]/\]/' | jq . | tee "./metadata.json_arm64_v8a_Android" &
echo "[" $(cat metadata.json.tmp_aarch64_arm64_Linux | tr '\n' ' ' | sed 's/}/},/g' | sed '$ s/,$//') "]" | sed '$s/,[[:space:]]*\]/\]/' | jq . | tee "./metadata.json_aarch64_arm64_Linux" &
echo "[" $(cat metadata.json.tmp_x86_64_Linux | tr '\n' ' ' | sed 's/}/},/g' | sed '$ s/,$//') "]" | sed '$s/,[[:space:]]*\]/\]/' | jq . | tee "./metadata.json_x86_64_Linux" &
echo "[" $(cat metadata.json.tmp_x64_Windows | tr '\n' ' ' | sed 's/}/},/g' | sed '$ s/,$//') "]" | sed '$s/,[[:space:]]*\]/\]/' | jq . | tee "./metadata.json_x64_Windows" &
##Update Metadata
rclone copyto --checksum "./metadata.json_arm64_v8a_Android" "r2:/bin/arm64_v8a_Android/METADATA.json.tmp" --check-first --checkers 2000 --transfers 1000 --progress &
rclone copyto --checksum "./metadata.json_aarch64_arm64_Linux" "r2:/bin/aarch64_arm64_Linux/METADATA.json.tmp" --check-first --checkers 2000 --transfers 1000 --progress &
rclone copyto --checksum "./metadata.json_x86_64_Linux" "r2:/bin/x86_64_Linux/METADATA.json.tmp" --check-first --checkers 2000 --transfers 1000 --progress &
rclone copyto --checksum "./metadata.json_x64_Windows" "r2:/bin/x64_Windows/METADATA.json.tmp" --check-first --checkers 2000 --transfers 1000 --progress &
wait ; echo
continue-on-error: true
- name: rClone Generate Metadata (BASEUTILS)
run: |
# Presets
set +x ; set +e
#--------------#
#touch "$HOME/.rclone.conf"
echo "${{ secrets.RCLONE_CF_R2_PUB }}" > "$HOME/.rclone.conf"
#Get JQ Module to convert size : https://users.aalto.fi/~tontti/posts/jq-and-human-readable-bytes/
curl -qfsSL "https://pub.ajam.dev/utils/devscripts/jq/to_human_bytes.jq" -o "./to_human_bytes.jq"
#--------------------#
##arm64_v8a_Android##
rclone copy "r2:/bin/arm64_v8a_Android/Baseutils/" "./metadata_Baseutils_arm64_v8a_Android_TEMP_JSON/" --include="INFO.json" --user-agent="$USER_AGENT" --buffer-size="10M" --s3-upload-concurrency="50" --s3-chunk-size="10M" --multi-thread-streams="50" --checkers="2000" --transfers="100" --retries="10" --check-first --checksum --copy-links --fast-list --progress &
##aarch64_arm64_Linux##
rclone copy "r2:/bin/aarch64_arm64_Linux/Baseutils/" "./metadata_Baseutils_aarch64_arm64_Linux_TEMP_JSON/" --include="INFO.json" --user-agent="$USER_AGENT" --buffer-size="10M" --s3-upload-concurrency="50" --s3-chunk-size="10M" --multi-thread-streams="50" --checkers="2000" --transfers="100" --retries="10" --check-first --checksum --copy-links --fast-list --progress &
##x86_64_Linux##
rclone copy "r2:/bin/x86_64_Linux/Baseutils/" "./metadata_Baseutils_x86_64_Linux_TEMP_JSON/" --include="INFO.json" --user-agent="$USER_AGENT" --buffer-size="10M" --s3-upload-concurrency="50" --s3-chunk-size="10M" --multi-thread-streams="50" --checkers="2000" --transfers="100" --retries="10" --check-first --checksum --copy-links --fast-list --progress &
##x64_Windows##
rclone copy "r2:/bin/x64_Windows/Baseutils/" "./metadata_Baseutils_x64_Windows_TEMP_JSON/" --include="INFO.json" --user-agent="$USER_AGENT" --buffer-size="10M" --s3-upload-concurrency="50" --s3-chunk-size="10M" --multi-thread-streams="50" --checkers="2000" --transfers="100" --retries="10" --check-first --checksum --copy-links --fast-list --progress &
##Merge (INFO)
wait ; echo
find "./metadata_Baseutils_arm64_v8a_Android_TEMP_JSON/" -iname "INFO.json" -exec jq -c '.[]' {} \; > "./metadata_Baseutils_arm64_v8a_Android_INFO_ALL.json" &
##aarch64_arm64_Linux##
find "./metadata_Baseutils_aarch64_arm64_Linux_TEMP_JSON/" -iname "INFO.json" -exec jq -c '.[]' {} \; > "./metadata_Baseutils_aarch64_arm64_Linux_INFO_ALL.json" &
find "./metadata_Baseutils_x86_64_Linux_TEMP_JSON/" -iname "INFO.json" -exec jq -c '.[]' {} \; > "./metadata_Baseutils_x86_64_Linux_INFO_ALL.json" &
find "./metadata_Baseutils_x64_Windows_TEMP_JSON/" -iname "INFO.json" -exec jq -c '.[]' {} \; > "./metadata_Baseutils_x64_Windows_INFO_ALL.json" &
##Enrich
wait ; echo
rclone lsjson --fast-list "r2:/bin/arm64_v8a_Android/Baseutils/" --files-only | jq -r 'include "./to_human_bytes" ; .[] | select(.Size != 0 and .Size != -1 and (.Name | test("\\.(7z|ascii|bz2|gz|jq|json|log|md|png|rar|svg|tar|tgz|tmp|txt|upx|zip)$") | not)) | {name: (.Name), build_date: (.ModTime | split(".")[0]), build_log, build_script, b3sum, description, download_url: "https://bin.ajam.dev/arm64_v8a_Android/Baseutils/\(.Path)", extra_bins, note, sha256, size: (.Size | tonumber | bytes), repo_url, web_url}' | jq -s 'sort_by(.name)' | jq '.[]' > "./metadata_Baseutils.json.tmp_arm64_v8a_Android" &
##aarch64_arm64_Linux##
rclone lsjson --fast-list "r2:/bin/aarch64_arm64_Linux/Baseutils/" --files-only | jq -r 'include "./to_human_bytes" ; .[] | select(.Size != 0 and .Size != -1 and (.Name | test("\\.(7z|ascii|bz2|gz|jq|json|log|md|png|rar|svg|tar|tgz|tmp|txt|upx|zip)$") | not)) | {name: (.Name), build_date: (.ModTime | split(".")[0]), build_log, build_script, b3sum, description, download_url: "https://bin.ajam.dev/aarch64_arm64_Linux/Baseutils/\(.Path)", extra_bins, note, sha256, size: (.Size | tonumber | bytes), repo_url, web_url}' | jq -s 'sort_by(.name)' | jq '.[]' > "./metadata_Baseutils.json.tmp_aarch64_arm64_Linux" &
##x86_64_Linux##
rclone lsjson --fast-list "r2:/bin/x86_64_Linux/Baseutils/" --files-only | jq -r 'include "./to_human_bytes" ; .[] | select(.Size != 0 and .Size != -1 and (.Name | test("\\.(7z|ascii|bz2|gz|jq|json|log|md|png|rar|svg|tar|tgz|tmp|txt|upx|zip)$") | not)) | {name: (.Name), build_date: (.ModTime | split(".")[0]), build_log, build_script, b3sum, description, download_url: "https://bin.ajam.dev/x86_64_Linux/Baseutils/\(.Path)", extra_bins, note, sha256, size: (.Size | tonumber | bytes), repo_url, web_url}' | jq -s 'sort_by(.name)' | jq '.[]' > "./metadata_Baseutils.json.tmp_x86_64_Linux" &
##x64_Windows##
rclone lsjson --fast-list "r2:/bin/x64_Windows/Baseutils/" --files-only | jq -r 'include "./to_human_bytes" ; .[] | select(.Size != 0 and .Size != -1 and (.Name | test("\\.(7z|ascii|bz2|gz|jq|json|log|md|png|rar|svg|tar|tgz|tmp|txt|upx|zip)$") | not)) | {name: (.Name), build_date: (.ModTime | split(".")[0]), build_log, build_script, b3sum, description, download_url: "https://bin.ajam.dev/x64_Windows/Baseutils/\(.Path)", extra_bins, note, sha256, size: (.Size | tonumber | bytes), repo_url, web_url}' | jq -s 'sort_by(.name)' | jq '.[]' > "./metadata_Baseutils.json.tmp_x64_Windows" &
##Clean
wait ; echo
sed -i 's/: null/: ""/g' "./metadata_Baseutils.json.tmp_arm64_v8a_Android" &
sed -i 's/: null/: ""/g' "./metadata_Baseutils.json.tmp_aarch64_arm64_Linux" &
sed -i 's/: null/: ""/g' "./metadata_Baseutils.json.tmp_x86_64_Linux" &
sed -i 's/: null/: ""/g' "./metadata_Baseutils.json.tmp_x64_Windows" &
##Merge (ALL)
wait ; echo
jq -s 'sort_by(.download_url)' "./metadata_Baseutils.json.tmp_arm64_v8a_Android" "./metadata_Baseutils_arm64_v8a_Android_INFO_ALL.json" > "./metadata_Baseutils.json_arm64_v8a_Android" &
jq -s 'sort_by(.download_url)' "./metadata_Baseutils.json.tmp_aarch64_arm64_Linux" "./metadata_Baseutils_aarch64_arm64_Linux_INFO_ALL.json" > "./metadata_Baseutils.json_aarch64_arm64_Linux" &
jq -s 'sort_by(.download_url)' "./metadata_Baseutils.json.tmp_x86_64_Linux" "./metadata_Baseutils_x86_64_Linux_INFO_ALL.json" > "./metadata_Baseutils.json_x86_64_Linux" &
jq -s 'sort_by(.download_url)' "./metadata_Baseutils.json.tmp_x64_Windows" "./metadata_Baseutils_x64_Windows_INFO_ALL.json" > "./metadata_Baseutils.json_x64_Windows" &
##Update
rclone copyto --checksum "./metadata_Baseutils.json_arm64_v8a_Android" "r2:/bin/arm64_v8a_Android/Baseutils/METADATA.json" &
rclone copyto --checksum "./metadata_Baseutils.json_aarch64_arm64_Linux" "r2:/bin/aarch64_arm64_Linux/Baseutils/METADATA.json" &
rclone copyto --checksum "./metadata_Baseutils.json_x86_64_Linux" "r2:/bin/x86_64_Linux/Baseutils/METADATA.json" &
rclone copyto --checksum "./metadata_Baseutils.json_x64_Windows" "r2:/bin/x64_Windows/Baseutils/METADATA.json" &
wait ; echo
continue-on-error: true
#------------------------------------------------------------------------------------#
- name: rClone BackUp Repo-II ("https://pub.ajam.dev/repos/$GITHUB_REPOSITORY")
run: |
# Presets
set +x ; set +e
#--------------#
#touch "$HOME/.rclone.conf"
echo "${{ secrets.RCLONE_CF_R2_PUB }}" > "$HOME/.rclone.conf"
#chdir to Repo
cd "$GITHUB_WORKSPACE/main"
#Git pull
git pull origin main --no-edit 2>/dev/null
#Del Bloat
rm -rf "$(pwd)/.git"
#Upload to Pub
echo -e "[+] Syncing $GITHUB_REPOSITORY to pub.ajam.dev/repos/$GITHUB_REPOSITORY \n"
rclone sync "." "r2:/pub/repos/$GITHUB_REPOSITORY/" --user-agent="$USER_AGENT" --buffer-size="100M" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --check-first --checksum --copy-links --fast-list --progress
continue-on-error: true
#------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------#
enrich-arm64v8a-Android:
runs-on: ubuntu-latest
needs: [check-post]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: main
filter: "blob:none" #https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- name: Setup Env
run: |
#presets
set +x ; set +e
#tmp
SYSTMP="$(dirname $(mktemp -u))" && export SYSTMP="$SYSTMP"
#GH ENV
echo "SYSTMP=$SYSTMP" >> "$GITHUB_ENV"
#GH Dirs
mkdir -p "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux"
mkdir -p "$GITHUB_WORKSPACE/main/arm64_v8a_Android"
mkdir -p "$GITHUB_WORKSPACE/main/x64_Windows"
mkdir -p "$GITHUB_WORKSPACE/main/x86_64_Linux"
#-------------#
mkdir -p "$HOME/bin"
##Setup rClone
mkdir -p "$HOME/.config/rclone"
echo "${{ secrets.RCLONE_CF_R2_PUB }}" > "$HOME/.config/rclone/rclone.conf"
export RCLONE_STATS="120s" ; echo "RCLONE_STATS=$RCLONE_STATS" >> "$GITHUB_ENV"
##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: Install Addons
run: |
#presets
set +x ; set +e
#-------------#
bash <(curl -qfsSL "https://pub.ajam.dev/repos/Azathothas/Arsenal/misc/Linux/install_dev_tools.sh")
sudo apt-get update -y -qq && sudo apt-get install kmod -y -qq
sudo apt-get update -y -qq && sudo apt-get install fuse3 -y -qq
sudo apt-get update -y -qq && sudo apt-get install libfuse3-dev -y -qq
sudo sed 's/#user_allow_other/user_allow_other/g' -i "/etc/fuse.conf"
continue-on-error: true
- name: rClone Check Metadata (bin.ajam.dev/arm64_v8a_Android)
run: |
#presets
set +x ; set +e
#-------------#
BINDIR="${SYSTMP}/toolpack_arm64_v8a_Android" && export BINDIR="${BINDIR}"
mkdir -p "${BINDIR}"
rclone mount "r2:/bin/arm64_v8a_Android/" "${BINDIR}" \
--daemon \
--allow-other \
--no-modtime \
--read-only \
--attr-timeout 15s \
--checkers 100 \
--buffer-size 512M \
--dir-cache-time 5m \
--low-level-retries 10 \
--multi-thread-streams 16 \
--poll-interval 15s \
--transfers 16 \
--vfs-read-wait 0 \
--vfs-cache-mode full \
--vfs-cache-max-size 20G \
--vfs-cache-poll-interval 15s \
--vfs-read-chunk-size 128M \
--vfs-read-chunk-size-limit off \
--user-agent="${USER_AGENT}" ; df -h
#File
cd "${BINDIR}" && find "./" -maxdepth 1 -type f | grep -v -E '\.7z$|\.gz$|\.jq$|\.json$|\.log$|\.md$|\.tar$|\.tgz$|\.tmp$|\.txt$|\.upx$|\.zip$|Baseutils/' | sort | xargs file | sed 's/^.\///' > "${SYSTMP}/arm64_v8a_Android_FILE"
rclone copyto "${SYSTMP}/arm64_v8a_Android_FILE" "r2:/bin/arm64_v8a_Android/FILE.txt" --user-agent="${USER_AGENT}" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --retries="10" --check-first --checksum --copy-links --fast-list --progress
#Size (Dust)
dust --depth 1 -v '\.7z$|\.gz$|\.jq$|\.json$|\.log$|\.md$|\.tar$|\.tgz$|\.tmp$|\.txt$|\.upx$|\.zip$|Baseutils/' --only-file --no-percent-bars --no-colors --ignore_hidden --reverse --number-of-lines 99999999 "${BINDIR}" | tee "${SYSTMP}/arm64_v8a_Android_SIZE.txt"
rclone copyto "${SYSTMP}/arm64_v8a_Android_SIZE.txt" "r2:/bin/arm64_v8a_Android/SIZE.txt" --user-agent="${USER_AGENT}" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --retries="10" --check-first --checksum --copy-links --fast-list --progress
#BLAKE3SUM
cd "${BINDIR}" && find "./" -maxdepth 1 -type f | grep -v -E '\.7z$|\.gz$|\.jq$|\.json$|\.log$|\.md$|\.tar$|\.tgz$|\.tmp$|\.txt$|\.upx$|\.zip$|Baseutils/' | sort | xargs b3sum | sed 's/\.\///g' > "${SYSTMP}/arm64_v8a_Android_BLAKE3SUM"
rclone copyto "${SYSTMP}/arm64_v8a_Android_BLAKE3SUM" "r2:/bin/arm64_v8a_Android/BLAKE3SUM.txt" --user-agent="${USER_AGENT}" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --retries="10" --check-first --checksum --copy-links --fast-list --progress
#SHA256SUM
cd "${BINDIR}" && find "./" -maxdepth 1 -type f | grep -v -E '\.7z$|\.gz$|\.jq$|\.json$|\.log$|\.md$|\.tar$|\.tgz$|\.tmp$|\.txt$|\.upx$|\.zip$|Baseutils/' | sort | xargs sha256sum | sed 's/\.\///g' > "${SYSTMP}/arm64_v8a_Android_SHA256SUM"
rclone copyto "${SYSTMP}/arm64_v8a_Android_SHA256SUM" "r2:/bin/arm64_v8a_Android/SHA256SUM.txt" --user-agent="${USER_AGENT}" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --retries="10" --check-first --checksum --copy-links --fast-list --progress
##Purge
#rm -rf "${BINDIR}"
sudo fusermount3 -uz "${BINDIR}" ; df -h
continue-on-error: true
- name: rClone Enrich Metadata (bin.ajam.dev/arm64_v8a_Android)
run: |
# Presets
set +x ; set +e
#--------------#
##Run
chmod +x "$GITHUB_WORKSPACE/main/.github/scripts/arm64_v8a_Android/gen_meta.sh"
dos2unix --quiet "$GITHUB_WORKSPACE/main/.github/scripts/arm64_v8a_Android/gen_meta.sh"
bash "$GITHUB_WORKSPACE/main/.github/scripts/arm64_v8a_Android/gen_meta.sh"
cd "$GITHUB_WORKSPACE/main/.github/scripts/arm64_v8a_Android/bins/" && yq ea '[.]' *.yaml > "$GITHUB_WORKSPACE/main/arm64_v8a_Android/BINS.yaml"
continue-on-error: true
#------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------#
enrich-arm64-Linux:
runs-on: ubuntu-latest
needs: [check-post]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: main
filter: "blob:none" #https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- name: Setup Env
run: |
#presets
set +x ; set +e
#tmp
SYSTMP="$(dirname $(mktemp -u))" && export SYSTMP="$SYSTMP"
#GH ENV
echo "SYSTMP=$SYSTMP" >> "$GITHUB_ENV"
#GH Dirs
mkdir -p "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux"
mkdir -p "$GITHUB_WORKSPACE/main/arm64_v8a_Android"
mkdir -p "$GITHUB_WORKSPACE/main/x64_Windows"
mkdir -p "$GITHUB_WORKSPACE/main/x86_64_Linux"
#-------------#
mkdir -p "$HOME/bin"
##Setup rClone
mkdir -p "$HOME/.config/rclone"
echo "${{ secrets.RCLONE_CF_R2_PUB }}" > "$HOME/.config/rclone/rclone.conf"
export RCLONE_STATS="120s" ; echo "RCLONE_STATS=$RCLONE_STATS" >> "$GITHUB_ENV"
##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: Install Addons
run: |
#presets
set +x ; set +e
#-------------#
bash <(curl -qfsSL "https://pub.ajam.dev/repos/Azathothas/Arsenal/misc/Linux/install_dev_tools.sh")
sudo apt-get update -y -qq && sudo apt-get install kmod -y -qq
sudo apt-get update -y -qq && sudo apt-get install fuse3 -y -qq
sudo apt-get update -y -qq && sudo apt-get install libfuse3-dev -y -qq
sudo sed 's/#user_allow_other/user_allow_other/g' -i "/etc/fuse.conf"
continue-on-error: true
- name: rClone Check Metadata (bin.ajam.dev/aarch64_arm64_Linux)
run: |
#presets
set +x ; set +e
#-------------#
BINDIR="${SYSTMP}/toolpack_aarch64" && export BINDIR="${BINDIR}"
mkdir -p "${BINDIR}"
rclone mount "r2:/bin/aarch64_arm64_Linux/" "${BINDIR}" \
--daemon \
--allow-other \
--no-modtime \
--read-only \
--attr-timeout 15s \
--checkers 100 \
--buffer-size 512M \
--dir-cache-time 5m \
--low-level-retries 10 \
--multi-thread-streams 16 \
--poll-interval 15s \
--transfers 16 \
--vfs-read-wait 0 \
--vfs-cache-mode full \
--vfs-cache-max-size 20G \
--vfs-cache-poll-interval 15s \
--vfs-read-chunk-size 128M \
--vfs-read-chunk-size-limit off \
--user-agent="${USER_AGENT}" ; df -h
#File
cd "${BINDIR}" && find "./" -maxdepth 1 -type f | grep -v -E '\.7z$|\.gz$|\.jq$|\.json$|\.log$|\.md$|\.tar$|\.tgz$|\.tmp$|\.txt$|\.upx$|\.zip$|Baseutils/' | sort | xargs file | sed 's/^.\///' > "${SYSTMP}/aarch64_Linux_FILE"
rclone copyto "${SYSTMP}/aarch64_Linux_FILE" "r2:/bin/aarch64_arm64_Linux/FILE.txt" --user-agent="${USER_AGENT}" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --retries="10" --check-first --checksum --copy-links --fast-list --progress
#Size (Dust)
dust --depth 1 -v '\.7z$|\.gz$|\.jq$|\.json$|\.log$|\.md$|\.tar$|\.tgz$|\.tmp$|\.txt$|\.upx$|\.zip$|Baseutils/' --only-file --no-percent-bars --no-colors --ignore_hidden --reverse --number-of-lines 99999999 "${BINDIR}" | tee "${SYSTMP}/aarch64_Linux_SIZE.txt"
rclone copyto "${SYSTMP}/aarch64_Linux_SIZE.txt" "r2:/bin/aarch64_arm64_Linux/SIZE.txt" --user-agent="${USER_AGENT}" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --retries="10" --check-first --checksum --copy-links --fast-list --progress
#BLAKE3SUM
cd "${BINDIR}" && find "./" -maxdepth 1 -type f | grep -v -E '\.7z$|\.gz$|\.jq$|\.json$|\.log$|\.md$|\.tar$|\.tgz$|\.tmp$|\.txt$|\.upx$|\.zip$|Baseutils/' | sort | xargs b3sum | sed 's/\.\///g' > "${SYSTMP}/aarch64_Linux_BLAKE3SUM"
rclone copyto "${SYSTMP}/aarch64_Linux_BLAKE3SUM" "r2:/bin/aarch64_arm64_Linux/BLAKE3SUM.txt" --user-agent="${USER_AGENT}" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --retries="10" --check-first --checksum --copy-links --fast-list --progress
#SHA256SUM
cd "${BINDIR}" && find "./" -maxdepth 1 -type f | grep -v -E '\.7z$|\.gz$|\.jq$|\.json$|\.log$|\.md$|\.tar$|\.tgz$|\.tmp$|\.txt$|\.upx$|\.zip$|Baseutils/' | sort | xargs sha256sum | sed 's/\.\///g' > "${SYSTMP}/aarch64_Linux_SHA256SUM"
rclone copyto "${SYSTMP}/aarch64_Linux_SHA256SUM" "r2:/bin/aarch64_arm64_Linux/SHA256SUM.txt" --user-agent="${USER_AGENT}" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --retries="10" --check-first --checksum --copy-links --fast-list --progress
##Purge
#rm -rf "${BINDIR}"
sudo fusermount3 -uz "${BINDIR}" ; df -h
continue-on-error: true
- name: rClone Enrich Metadata (bin.ajam.dev/aarch64_arm64_Linux)
run: |
# Presets
set +x ; set +e
#--------------#
##Run
chmod +x "$GITHUB_WORKSPACE/main/.github/scripts/aarch64_Linux/gen_meta.sh"
dos2unix --quiet "$GITHUB_WORKSPACE/main/.github/scripts/aarch64_Linux/gen_meta.sh"
bash "$GITHUB_WORKSPACE/main/.github/scripts/aarch64_Linux/gen_meta.sh"
cd "$GITHUB_WORKSPACE/main/.github/scripts/aarch64_Linux/bins/" && yq ea '[.]' *.yaml > "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux/BINS.yaml"
continue-on-error: true
#------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------#
enrich-x86-64-Linux:
runs-on: ubuntu-latest
needs: [check-post]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: main
filter: "blob:none" #https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
- name: Setup Env
run: |
#presets
set +x ; set +e
#tmp
SYSTMP="$(dirname $(mktemp -u))" && export SYSTMP="$SYSTMP"
#GH ENV
echo "SYSTMP=$SYSTMP" >> "$GITHUB_ENV"
#GH Dirs
mkdir -p "$GITHUB_WORKSPACE/main/aarch64_arm64_Linux"
mkdir -p "$GITHUB_WORKSPACE/main/arm64_v8a_Android"
mkdir -p "$GITHUB_WORKSPACE/main/x64_Windows"
mkdir -p "$GITHUB_WORKSPACE/main/x86_64_Linux"
#-------------#
mkdir -p "$HOME/bin"
##Setup rClone
mkdir -p "$HOME/.config/rclone"
echo "${{ secrets.RCLONE_CF_R2_PUB }}" > "$HOME/.config/rclone/rclone.conf"
export RCLONE_STATS="120s" ; echo "RCLONE_STATS=$RCLONE_STATS" >> "$GITHUB_ENV"
##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: Install Addons
run: |
#presets
set +x ; set +e
#-------------#
bash <(curl -qfsSL "https://pub.ajam.dev/repos/Azathothas/Arsenal/misc/Linux/install_dev_tools.sh")
sudo apt-get update -y -qq && sudo apt-get install kmod -y -qq
sudo apt-get update -y -qq && sudo apt-get install fuse3 -y -qq
sudo apt-get update -y -qq && sudo apt-get install libfuse3-dev -y -qq
sudo sed 's/#user_allow_other/user_allow_other/g' -i "/etc/fuse.conf"
continue-on-error: true
- name: rClone Check Metadata (bin.ajam.dev/x86_64_Linux)
run: |
#presets
set +x ; set +e
#-------------#
BINDIR="${SYSTMP}/toolpack_x86_64" && export BINDIR="${BINDIR}"
mkdir -p "${BINDIR}"
rclone mount "r2:/bin/x86_64_Linux/" "${BINDIR}" \
--daemon \
--allow-other \
--no-modtime \
--read-only \
--attr-timeout 15s \
--checkers 100 \
--buffer-size 512M \
--dir-cache-time 5m \
--low-level-retries 10 \
--multi-thread-streams 16 \
--poll-interval 15s \
--transfers 16 \
--vfs-read-wait 0 \
--vfs-cache-mode full \
--vfs-cache-max-size 20G \
--vfs-cache-poll-interval 15s \
--vfs-read-chunk-size 128M \
--vfs-read-chunk-size-limit off \
--user-agent="${USER_AGENT}" ; df -h
#File
cd "${BINDIR}" && find "./" -maxdepth 1 -type f | grep -v -E '\.7z$|\.gz$|\.jq$|\.json$|\.log$|\.md$|\.tar$|\.tgz$|\.tmp$|\.txt$|\.upx$|\.zip$|Baseutils/' | sort | xargs file | sed 's/^.\///' > "${SYSTMP}/x86_64_Linux_FILE"
rclone copyto "${SYSTMP}/x86_64_Linux_FILE" "r2:/bin/x86_64_Linux/FILE.txt" --user-agent="$USER_AGENT" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --retries="10" --check-first --checksum --copy-links --fast-list --progress
#Size (Dust)
dust --depth 1 -v '\.7z$|\.gz$|\.jq$|\.json$|\.log$|\.md$|\.tar$|\.tgz$|\.tmp$|\.txt$|\.upx$|\.zip$|Baseutils/' --only-file --no-percent-bars --no-colors --ignore_hidden --reverse --number-of-lines 99999999 "${BINDIR}" | tee "${SYSTMP}/x86_64_Linux_SIZE.txt"
rclone copyto "${SYSTMP}/x86_64_Linux_SIZE.txt" "r2:/bin/x86_64_Linux/SIZE.txt" --user-agent="$USER_AGENT" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --retries="10" --check-first --checksum --copy-links --fast-list --progress
#BLAKE3SUM
cd "${BINDIR}" && find "./" -maxdepth 1 -type f | grep -v -E '\.7z$|\.gz$|\.jq$|\.json$|\.log$|\.md$|\.tar$|\.tgz$|\.tmp$|\.txt$|\.upx$|\.zip$|Baseutils/' | sort | xargs b3sum | sed 's/\.\///g' > "${SYSTMP}/x86_64_Linux_BLAKE3SUM"
rclone copyto "${SYSTMP}/x86_64_Linux_BLAKE3SUM" "r2:/bin/x86_64_Linux/BLAKE3SUM.txt" --user-agent="$USER_AGENT" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --retries="10" --check-first --checksum --copy-links --fast-list --progress
#SHA256SUM
cd "${BINDIR}" && find "./" -maxdepth 1 -type f | grep -v -E '\.7z$|\.gz$|\.jq$|\.json$|\.log$|\.md$|\.tar$|\.tgz$|\.tmp$|\.txt$|\.upx$|\.zip$|Baseutils/' | sort | xargs sha256sum | sed 's/\.\///g' > "${SYSTMP}/x86_64_Linux_SHA256SUM"
rclone copyto "${SYSTMP}/x86_64_Linux_SHA256SUM" "r2:/bin/x86_64_Linux/SHA256SUM.txt" --user-agent="$USER_AGENT" --s3-upload-concurrency="500" --s3-chunk-size="100M" --multi-thread-streams="500" --checkers="2000" --transfers="1000" --retries="10" --check-first --checksum --copy-links --fast-list --progress
##Purge
#rm -rf "${BINDIR}"
sudo fusermount3 -uz "${BINDIR}" ; df -h
continue-on-error: true
- name: rClone Enrich Metadata (bin.ajam.dev/x86_64_Linux)
run: |
# Presets
set +x ; set +e
#--------------#
##Run
chmod +x "$GITHUB_WORKSPACE/main/.github/scripts/x86_64_Linux/gen_meta.sh"
dos2unix --quiet "$GITHUB_WORKSPACE/main/.github/scripts/x86_64_Linux/gen_meta.sh"
bash "$GITHUB_WORKSPACE/main/.github/scripts/x86_64_Linux/gen_meta.sh"
cd "$GITHUB_WORKSPACE/main/.github/scripts/x86_64_Linux/bins/" && yq ea '[.]' *.yaml > "$GITHUB_WORKSPACE/main/x86_64_Linux/BINS.yaml"
continue-on-error: true
#------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------#