ci: implement automatic updates

This commit is contained in:
2025-07-14 08:28:18 +03:00
parent c59de00b3c
commit 1f7dbe81f0
4 changed files with 57 additions and 0 deletions

View File

@ -0,0 +1,44 @@
name: Update packages
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-specs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install alr-spec deps
run: |
apt-get update && apt-get install -y python3-nvchecker shfmt
- name: Install alr-spec
run: |
curl -L -o /bin/alr-spec https://altlinux.space/aides-community/alr-utils/releases/download/v0.0.4/alr-spec-linux-amd64
chmod +x /bin/alr-spec
- name: Update
run: |
set -e
PACKAGES=(
"discord-bin"
"firefox-bin"
"telegram-desktop-bin"
)
for pkg in "${PACKAGES[@]}"
do
echo "Updating $pkg"
alr-spec update-package --keep-skip-checksums "./$pkg"
done
- name: Commit and push if changes
run: |
git config user.name "gitea"
git config user.email "admin@plemya-x.ru"
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Automatic package updates"
git push
else
echo "No changes to commit."
fi

View File

@ -0,0 +1,4 @@
[discord-linux-tar]
source = "httpheader"
url = "https://discord.com/api/download?platform=linux&format=tar.gz"
regex = "discord-([0-9.]+).tar.gz"

View File

@ -0,0 +1,4 @@
[firefox]
source = "regex"
url = "https://product-details.mozilla.org/1.0/firefox_versions.json"
regex = '"LATEST_FIREFOX_VERSION": "([0-9.]+)"'

View File

@ -0,0 +1,5 @@
[telegram-desktop-bin]
source = "github"
github = "telegramdesktop/tdesktop"
use_latest_release = true
prefix = "v"