-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc3bd8f
commit 9e36971
Showing
7 changed files
with
2,055 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#https://github.com/lycheeverse/lychee-action | ||
name: 🔎 Check Links 🔗 | ||
|
||
on: | ||
repository_dispatch: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "15 0 * * 1" #12:15 AM UTC --> 06:00 AM NPT Tue | ||
|
||
jobs: | ||
linkChecker: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: main | ||
filter: "blob:none" | ||
|
||
- name: Link Checker | ||
id: lychee | ||
uses: lycheeverse/lychee-action@v2 | ||
with: | ||
fail: false | ||
|
||
- name: Create Issue From File | ||
if: steps.lychee.outputs.exit_code != 0 | ||
uses: peter-evans/create-issue-from-file@v5 | ||
with: | ||
title: Link Checker Report | ||
content-filepath: ./lychee/out.md | ||
labels: report, automated issue |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
name: ✅ Check GH Repos 🎋 | ||
|
||
on: | ||
repository_dispatch: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "30 23 * * *" #11:30 PM UTC --> 05:15 AM NPT | ||
|
||
jobs: | ||
RepoChecker: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
issues: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: main | ||
filter: "blob:none" | ||
|
||
- name: Setup Env | ||
run: | | ||
##presets | ||
set +x ; set +e | ||
#-------------# | ||
##CoreUtils | ||
sudo apt update -y | ||
sudo apt install bc coreutils curl dos2unix fdupes jq moreutils wget -y | ||
sudo apt-get install apt-transport-https apt-utils ca-certificates coreutils dos2unix gnupg2 jq moreutils p7zip-full rename rsync software-properties-common texinfo tmux util-linux wget -y 2>/dev/null ; sudo apt-get update -y 2>/dev/null | ||
##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}" | ||
##Tools | ||
#PARALLEL="1" bash <(curl -qfsSL "https://raw.githubusercontent.com/pkgforge/devscripts/refs/heads/main/Linux/install_bins_curl.sh") | ||
continue-on-error: true | ||
|
||
- name: Gen Markdown (Main + Archived) | ||
run: | | ||
##presets | ||
set +x ; set +e | ||
#-------------# | ||
pushd "$(mktemp -d)" >/dev/null 2>&1 | ||
rm -rvf "/tmp/ARCHIVED.txt" 2>/dev/null | ||
#curl -qfsSL "https://meta.pkgforge.dev/soarpkgs/data/INDEX.json" | jq -r '.[] | select(._disabled == "false") | .src_url[]' | sort -u -o "${GITHUB_WORKSPACE}/main/soarpkgs/data/URLS.txt" | ||
cat "${GITHUB_WORKSPACE}/main/soarpkgs/data/INDEX.json" | jq -r '.[] | select(._disabled == "false") | .src_url[]' | sort -u -o "${GITHUB_WORKSPACE}/main/soarpkgs/data/URLS.txt" | ||
grep -Ei "github.com" "${GITHUB_WORKSPACE}/main/soarpkgs/data/URLS.txt" | sed 's|https://github.com/\(.*\)/\(.*\)|https://api.gh.pkgforge.dev/repos/\1/\2|' | sort -u -o "./repos.txt" | ||
{ | ||
readarray -t "REPOS" < "./repos.txt" | ||
echo "| User | Repo | Stars | Description | Last Updated |" | ||
echo "|------|------|-------|-------------|--------------|" | ||
for repo_url in "${REPOS[@]}"; do | ||
unset response ; response=$(curl -qsL "$repo_url") | ||
if [ -n "${response}" ]; then | ||
user=$(jq -r '.owner.login' <<< "$response") | ||
archived=$(jq -r '.archived' <<< "$response") | ||
if [[ "$archived" == "true" ]]; then | ||
echo "${repo_url}" >> "/tmp/ARCHIVED.txt" | ||
fi | ||
description=$(jq -r '.description // "No description provided."' <<< "$response" | sed 's/`//g' | sed 's/^[ \t]*//;s/[ \t]*$//' | sed ':a;N;$!ba;s/\r\n//g; s/\n//g' | sed 's/["'\'']//g' | sed 's/|//g' | sed 's/`//g') | ||
last_updated=$(jq -r '.updated_at' <<< "$response") | ||
repo=$(jq -r '.name' <<< "$response") | ||
repo_url="https://github.com/$user/$repo" | ||
stars=$(jq -r '.stargazers_count' <<< "$response") | ||
user_url="https://github.com/$user" | ||
if [[ "$user" != "null" && "$repo" != "null" ]]; then | ||
echo "| [$user]($user_url) | [$repo]($repo_url) | $stars | $description | $last_updated |" | ||
fi | ||
fi | ||
done | ||
} | tee "./GH_REPO.md" | ||
if [[ -s "./GH_REPO.md" ]] && [[ $(stat -c%s "./GH_REPO.md") -gt 100 ]]; then | ||
cp -fv "./GH_REPO.md" "${GITHUB_WORKSPACE}/main/soarpkgs/data/GH_REPO.md" | ||
fi | ||
##Archived | ||
if [[ -s "/tmp/ARCHIVED.txt" ]] && [[ $(stat -c%s "/tmp/ARCHIVED.txt") -gt 100 ]]; then | ||
{ | ||
readarray -t "REPOS" < "/tmp/ARCHIVED.txt" | ||
echo "| User | Repo | Stars | Description | Last Updated |" | ||
echo "|------|------|-------|-------------|--------------|" | ||
for repo_url in "${REPOS[@]}"; do | ||
unset response ; response=$(curl -qsL "$repo_url") | ||
if [ -n "${response}" ]; then | ||
user=$(jq -r '.owner.login' <<< "$response") | ||
user_url="https://github.com/$user" | ||
repo=$(jq -r '.name' <<< "$response") | ||
repo_url="https://github.com/$user/$repo" | ||
description=$(jq -r '.description // "No description provided."' <<< "$response" | sed 's/`//g' | sed 's/^[ \t]*//;s/[ \t]*$//' | sed ':a;N;$!ba;s/\r\n//g; s/\n//g' | sed 's/["'\'']//g' | sed 's/|//g' | sed 's/`//g') | ||
last_updated=$(jq -r '.updated_at' <<< "$response") | ||
stars=$(jq -r '.stargazers_count' <<< "$response") | ||
echo "| [$user]($user_url) | [$repo]($repo_url) | $stars | $description | $last_updated |" | ||
fi | ||
done | ||
} | tee "./ARCHIVED.md" | ||
fi | ||
if [[ -s "./ARCHIVED.md" ]] && [[ $(stat -c%s "./ARCHIVED.md") -gt 100 ]]; then | ||
cp -fv "./ARCHIVED.md" "${GITHUB_WORKSPACE}/main/soarpkgs/data/GH_REPO_ARCHIVED.md" | ||
cp -fv "${GITHUB_WORKSPACE}/main/soarpkgs/data/GH_REPO_ARCHIVED.md" "/tmp/ARCHIVED.md" | ||
fi | ||
popd "$(mktemp -d)" >/dev/null 2>&1 | ||
continue-on-error: true | ||
|
||
- name: Create Issue From File | ||
uses: peter-evans/create-issue-from-file@v5 | ||
with: | ||
title: SBUILDS (Archived Repos) | ||
content-filepath: "/tmp/ARCHIVED.md" | ||
labels: report, automated issue | ||
continue-on-error: true | ||
|
||
- name: Get DateTime & Purge files (=> 95 MB) | ||
run: | | ||
#Presets | ||
set +x ; set +e | ||
#--------------# | ||
UTC_TIME="$(TZ='UTC' date +'%Y-%m-%d (%I:%M:%S %p)')" | ||
echo "UTC_TIME=$UTC_TIME" >> $GITHUB_ENV | ||
#Purge | ||
find "${GITHUB_WORKSPACE}/main" -path "${GITHUB_WORKSPACE}/main/.git" -prune -o -type f -size +95M -exec rm -rvf "{}" + 2>/dev/null | ||
continue-on-error: true | ||
|
||
- name: Git Pull & Update Readme | ||
run: | | ||
#Presets | ||
set +x ; set +e | ||
#--------------# | ||
cd "${GITHUB_WORKSPACE}/main" && git pull origin main || git pull origin main --ff-only || git merge --no-ff -m "Merge & Sync" | ||
continue-on-error: true | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
repository: ./main | ||
commit_user_name: Azathothas | ||
commit_user_email: [email protected] | ||
#commit_message: " " | ||
commit_message: "✅ Checked GH Repos 🎋" | ||
#push_options: '--force' | ||
continue-on-error: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: 🔎 Check Versions 🧬 | ||
|
||
on: | ||
repository_dispatch: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: "30 0 * * *" #12:30 AM UTC --> 06:15 AM NPT | ||
|
||
jobs: | ||
versionChecker: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
path: main | ||
filter: "blob:none" | ||
|
||
- name: Setup Env | ||
run: | | ||
##presets | ||
set +x ; set +e | ||
#-------------# | ||
##CoreUtils | ||
sudo apt update -y -qq | ||
sudo apt install bc coreutils curl dos2unix fdupes jq moreutils rsync util-linux wget -y -qq | ||
#temp | ||
SYSTMP="$(dirname $(mktemp -u))" && export SYSTMP="${SYSTMP}" | ||
echo "SYSTMP=${SYSTMP}" >> "${GITHUB_ENV}" | ||
continue-on-error: true | ||
|
||
- name: Version Checker | ||
run: | | ||
##presets | ||
set +x ; set +e | ||
#-------------# | ||
echo '- ### Empty/Non-Existent' > "${SYSTMP}/VERSION.md" | ||
jq -r '["| Package | SBUILD |", "|----------|----------|"] + (map(select(type == "object" and .version != null and ((.version | length == 0) or .version == null) and ._disabled == "false")) | map("| \(.pkg) | \(.build_script) |")) | .[]' "${GITHUB_WORKSPACE}/main/soarpkgs/data/INDEX.json" | awk '!seen[$0]++' >> "${SYSTMP}/VERSION.md" | ||
echo -e '---\n' >> "${SYSTMP}/VERSION.md" | ||
echo -e '- ### Only Words' >> "${SYSTMP}/VERSION.md" | ||
jq -r '["| Package | Version |", "|----------|----------|"] + (map(select(type == "object" and (.version | type == "string" and test("^[a-zA-Z-_+.]+$")) and ._disabled == "false")) | map("| [\(.pkg)](\(.build_script)) | \(.version) |")) | .[]' "${GITHUB_WORKSPACE}/main/soarpkgs/data/INDEX.json" | awk '!seen[$0]++' >> "${SYSTMP}/VERSION.md" | ||
continue-on-error: true | ||
|
||
- name: Create Issue From File | ||
uses: peter-evans/create-issue-from-file@v5 | ||
with: | ||
title: SBUILDS (Empty/Non-Existent/Weird Versions) | ||
content-filepath: "/tmp/VERSION.md" | ||
labels: report, automated issue | ||
continue-on-error: false |
Oops, something went wrong.