diff --git a/.gitea/workflows/update.yml b/.gitea/workflows/update.yml new file mode 100644 index 0000000..279f062 --- /dev/null +++ b/.gitea/workflows/update.yml @@ -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 diff --git a/discord-bin/.nvchecker.toml b/discord-bin/.nvchecker.toml new file mode 100644 index 0000000..b28fd34 --- /dev/null +++ b/discord-bin/.nvchecker.toml @@ -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" \ No newline at end of file diff --git a/firefox-bin/.nvchecker.toml b/firefox-bin/.nvchecker.toml new file mode 100644 index 0000000..93ba6ce --- /dev/null +++ b/firefox-bin/.nvchecker.toml @@ -0,0 +1,4 @@ +[firefox] +source = "regex" +url = "https://product-details.mozilla.org/1.0/firefox_versions.json" +regex = '"LATEST_FIREFOX_VERSION": "([0-9.]+)"' diff --git a/telegram-desktop-bin/.nvchecker.toml b/telegram-desktop-bin/.nvchecker.toml new file mode 100644 index 0000000..dcff538 --- /dev/null +++ b/telegram-desktop-bin/.nvchecker.toml @@ -0,0 +1,5 @@ +[telegram-desktop-bin] +source = "github" +github = "telegramdesktop/tdesktop" +use_latest_release = true +prefix = "v" \ No newline at end of file