Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

🛍️ Automated Tests 📦🗄️ #2

🛍️ Automated Tests 📦🗄️

🛍️ Automated Tests 📦🗄️ #2

name: 🛍️ Automated Tests 📦🗄️
#MAX_RUNTIME:
on:
workflow_dispatch:
#schedule:
# - cron: "*/45 * * * *" # Every 45 Mins
env:
GITHUB_TOKEN: ${{ secrets.HYSP_TOKEN }}
jobs:
#------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------#
fetch-meta:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: main
- name: Install CoreUtils & Deps
run: |
set +e
sudo apt-get update -y
sudo apt-get install coreutils ca-certificates curl git dos2unix lzip jq moreutils p7zip-full util-linux wget -y
#Re
sudo apt-get install coreutils ca-certificates curl git dos2unix lzip jq moreutils p7zip-full util-linux wget -y
continue-on-error: true
- name: Install Addons
run: |
set +e
#eget
sudo curl -qfsSL "https://raw.githubusercontent.com/Azathothas/Toolpacks/main/x86_64/eget" -o "/usr/local/bin/eget" && sudo chmod +xwr "/usr/local/bin/eget"
#validtoml
sudo curl -qfsSL "https://raw.githubusercontent.com/Azathothas/Toolpacks/main/x86_64/validtoml" -o "/usr/local/bin/validtoml" && sudo chmod +xwr "/usr/local/bin/validtoml"
#Yj
sudo curl -qfsSL "https://raw.githubusercontent.com/Azathothas/Toolpacks/main/x86_64/yj" -o "/usr/local/bin/yj" && sudo chmod +xwr "/usr/local/bin/yj"
continue-on-error: true
- name: Setup Env
run: |
# Create Output Dir
mkdir -p "$GITHUB_WORKSPACE/main/data/x86_64"
continue-on-error: true
#------------------------------------------------------------------------------------#
#------------------------------------------------------------------------------------#
- name: Dos2Unix Everything
run: |
cd "$GITHUB_WORKSPACE/main/data/x86_64/"
find . -type f -exec dos2unix {} \;
continue-on-error: true
- name: Git Pull
run: |
cd "$GITHUB_WORKSPACE/main" && git pull origin main
continue-on-error: true
- name: Generate Markdown ( Main README.md)
run: |
#Presets
set -x ; set +e ; ulimit -S -s unlimited
#--------------#
cd "$GITHUB_WORKSPACE/main"
#Generate $GITHUB_WORKSPACE/main/README.md
export TOTAL_PACKAGES="$(cat "$GITHUB_WORKSPACE/main/available.json" | jq -r '.packages[] | select(.architecture == "x86_64")' | jq -r '.name' | sort -u | wc -l)" && export TOTAL_PACKAGES="$TOTAL_PACKAGES"
sed "s/PLACEHOLDER_X86_64/$TOTAL_PACKAGES/g" "$GITHUB_WORKSPACE/main/INFO.md" | tee "$GITHUB_WORKSPACE/main/README.md"
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
- uses: stefanzweifel/git-auto-commit-action@v5
with:
repository: ./main
commit_user_name: Azathothas # defaults to "github-actions[bot]"
commit_user_email: AjamX101@gmail.com # defaults to "41898282+github-actions[bot]@users.noreply.github.com"
commit_message: "✅ 🛍️ Automated Tests🗄️ <-- ${{ env.NEPALI_TIME }} ⌚"
#push_options: '--force'
#------------------------------------------------------------------------------------#