Files
alr-repo/.gitea/workflows/update.yml

45 lines
1.2 KiB
YAML

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