Skip to content

Commit de405cd

Browse files
committed
Purge (Re:Init)
0 parents  commit de405cd

16 files changed

+38071
-0
lines changed

.github/SIZE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
```mathematica
2+
2.0M └─┬ main
3+
484K ├── pkgs.json
4+
388K ├── pkgs.yaml
5+
300K ├── index.html
6+
300K ├── README.md
7+
296K ├── termux.pkgs
8+
272K ├── pkgs.txt
9+
4.0K ├── LICENSE
10+
4.0K ├── INFO.md
11+
4.0K └── CNAME
12+
```

.github/SIZE.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2.0M └─┬ main
2+
484K ├── pkgs.json
3+
388K ├── pkgs.yaml
4+
300K ├── index.html
5+
300K ├── README.md
6+
296K ├── termux.pkgs
7+
272K ├── pkgs.txt
8+
4.0K ├── LICENSE
9+
4.0K ├── INFO.md
10+
4.0K └── CNAME

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"

.github/style.footer

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
</noscript>
2+
</body>
3+
</html>

.github/style.header

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<script src="https://rawcdn.githack.com/oscarmorrison/md-page/master/md-page.js"></script>
7+
<title>📦📱 Termux Packages 📱📦</title>
8+
<style>
9+
body {
10+
font-family: Arial, sans-serif;
11+
background-color: #121212;
12+
color: #e0e0e0;
13+
margin: 0;
14+
padding: 20px;
15+
}
16+
table {
17+
width: 100%;
18+
border-collapse: collapse;
19+
margin: 20px 0;
20+
}
21+
th, td {
22+
padding: 12px;
23+
text-align: left;
24+
border: 1px solid #424242;
25+
}
26+
th {
27+
background-color: #333333;
28+
}
29+
tr:nth-child(even) {
30+
background-color: #1e1e1e;
31+
}
32+
tr:nth-child(odd) {
33+
background-color: #1e1e1e;
34+
}
35+
a {
36+
color: #80cbc4;
37+
text-decoration: none;
38+
}
39+
a:hover {
40+
text-decoration: underline;
41+
}
42+
caption {
43+
font-size: 1.5em;
44+
margin-bottom: 10px;
45+
}
46+
</style>
47+
</head>
48+
<body>
49+
<noscript>
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
name: 🐧🧹 HealthChecks 🖳🗑️
2+
#MAX_RUNTIME: 02 Minutes */10 * * * *
3+
4+
on:
5+
#push:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: "45 02 * * *" # 02:45 AM UTC --> 08:30 AM Morning NPT
9+
#------------------------------------------------------------------------------------#
10+
jobs:
11+
check:
12+
runs-on: ubuntu-latest
13+
14+
permissions:
15+
contents: write
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
path: main
22+
filter: "blob:none" #https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
23+
24+
- name: Setup ENV
25+
run: |
26+
#presets
27+
set +x ; set +e
28+
#-------------#
29+
#tmp
30+
SYSTMP="$(dirname $(mktemp -u))" && export SYSTMP="${SYSTMP}"
31+
echo "SYSTMP=${SYSTMP}" >> "${GITHUB_ENV}"
32+
##User-Agent
33+
USER_AGENT="$(curl -qfsSL 'https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Misc/User-Agents/ua_chrome_macos_latest.txt')" && export USER_AGENT="${USER_AGENT}"
34+
echo "USER_AGENT=${USER_AGENT}" >> "${GITHUB_ENV}"
35+
continue-on-error: true
36+
37+
- name: Install Addons
38+
run: |
39+
#Presets
40+
set +x ; set +e
41+
#--------------#
42+
#action-lint
43+
sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/actionlint" -o "/usr/local/bin/actionlint" && sudo chmod +xwr "/usr/local/bin/actionlint"
44+
#delta
45+
sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/delta" -o "/usr/local/bin/delta" && sudo chmod +xwr "/usr/local/bin/delta"
46+
#dust
47+
sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/dust" -o "/usr/local/bin/dust" && sudo chmod +xwr "/usr/local/bin/dust"
48+
#eget
49+
sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/eget" -o "/usr/local/bin/eget" && sudo chmod +xwr "/usr/local/bin/eget"
50+
#git-sizer
51+
sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/git-sizer" -o "/usr/local/bin/git-sizer" && sudo chmod +xwr "/usr/local/bin/git-sizer"
52+
#rclone
53+
sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/rclone" -o "/usr/local/bin/rclone" && sudo chmod +xwr "/usr/local/bin/rclone"
54+
#validtoml
55+
sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/validtoml" -o "/usr/local/bin/validtoml" && sudo chmod +xwr "/usr/local/bin/validtoml"
56+
#Yq
57+
sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/yq" -o "/usr/local/bin/yq" && sudo chmod +xwr "/usr/local/bin/yq"
58+
#Yj
59+
sudo curl -qfsSL "https://bin.pkgforge.dev/$(uname -m)-$(uname -s)/yj" -o "/usr/local/bin/yj" && sudo chmod +xwr "/usr/local/bin/yj"
60+
continue-on-error: true
61+
62+
- name: Install Addons
63+
run: |
64+
#presets
65+
set +x ; set +e
66+
#-------------#
67+
bash <(curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Linux/install_bins_curl.sh")
68+
continue-on-error: true
69+
70+
- name: Dos2Unix Everything
71+
run: |
72+
#Presets
73+
set +x ; set +e
74+
#--------------#
75+
cd "${GITHUB_WORKSPACE}/main"
76+
find . -type f ! -path "./.git/*" -exec dos2unix {} \; 2>/dev/null
77+
continue-on-error: true
78+
79+
- name: ActionLint
80+
run: |
81+
#Presets
82+
set +x ; set +e
83+
#--------------#
84+
cd "${GITHUB_WORKSPACE}/main"
85+
find ".github/workflows" -type f -name "*ml" -exec actionlint {} \;
86+
continue-on-error: true
87+
88+
- name: Generate Repo Metadata (git-sizer)
89+
run: |
90+
#Presets
91+
set +x ; set +e
92+
#--------------#
93+
cd "${GITHUB_WORKSPACE}/main"
94+
#Dust sizes
95+
echo '```mathematica' > "${GITHUB_WORKSPACE}/main/.github/SIZE.md"
96+
dust -b -c -i -r -n 99999999 "${GITHUB_WORKSPACE}/main" | tee -a "${GITHUB_WORKSPACE}/main/.github/SIZE.md"
97+
dust -b -c -i -r -n 99999999 "${GITHUB_WORKSPACE}/main" | tee "${GITHUB_WORKSPACE}/main/.github/SIZE.txt"
98+
echo '```' >> "${GITHUB_WORKSPACE}/main/.github/SIZE.md"
99+
continue-on-error: true
100+
101+
- name: Ensure Healthy Commit Nums (RESET ON >= 1000)
102+
run: |
103+
#Presets
104+
set +x ; set +e
105+
#--------------#
106+
pushd "$(mktemp -d)" > /dev/null 2>&1 && git clone --filter="blob:none" "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
107+
cd "$(find . -maxdepth 1 -type d -exec basename {} \; | grep -Ev '^\.$' | xargs -I {} realpath {})"
108+
CLONED_DIR="$(realpath .)" && export CLONED_DIR="$CLONED_DIR"
109+
COMMIT_NUMS="$(git rev-list --count HEAD)" && export COMMIT_NUMS="${COMMIT_NUMS}"
110+
popd > /dev/null 2>&1 ; rm -rf "$CLONED_DIR" 2>/dev/null
111+
cd "${GITHUB_WORKSPACE}/main"
112+
if [ "${COMMIT_NUMS}" -gt 1000 ]; then
113+
echo -e "\n[+] Total number of commits exceeds 1000. (${COMMIT_NUMS})\n"
114+
cd "${GITHUB_WORKSPACE}/main"
115+
git config "user.name" "Azathothas"
116+
git config "user.email" "[email protected]"
117+
git checkout --orphan temp
118+
git add --all --verbose && git commit -m "Purge (Re:Init)"
119+
git branch -D "main"
120+
git branch -m "main"
121+
git push --set-upstream origin main --force
122+
echo "RESET_HISTORY=YES" >> "${GITHUB_ENV}"
123+
else
124+
echo -e "\n[+] Total number of commits looks healthy. (${COMMIT_NUMS})\n"
125+
echo "RESET_HISTORY=NO" >> "${GITHUB_ENV}"
126+
fi
127+
pushd "${GITHUB_WORKSPACE}/main" >/dev/null 2>&1 && git pull origin main && popd >/dev/null 2>&1
128+
continue-on-error: true
129+
130+
- name: Get DateTime
131+
run: |
132+
#Date Time
133+
NEPALI_TIME="$(TZ='Asia/Kathmandu' date +'%Y-%m-%d (%I:%M:%S %p)')"
134+
echo "NEPALI_TIME=${NEPALI_TIME}" >> "${GITHUB_ENV}"
135+
continue-on-error: true
136+
137+
- name: Git Pull
138+
run: |
139+
cd "${GITHUB_WORKSPACE}/main" && git pull origin main
140+
continue-on-error: true
141+
142+
- uses: stefanzweifel/git-auto-commit-action@v5
143+
with:
144+
repository: ./main
145+
commit_user_name: Azathothas # defaults to "github-actions[bot]"
146+
commit_user_email: [email protected] # defaults to "41898282+github-actions[bot]@users.noreply.github.com"
147+
commit_message: "✅ 🐧🧹 🖳🗑️"
148+
#push_options: '--force'
149+
continue-on-error: true

0 commit comments

Comments
 (0)