-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (46 loc) · 2.07 KB
/
check_versions_soarpkgs.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
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