Skip to content

Commit

Permalink
ci: Add workflow to auto-refresh packages
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsergio committed Nov 18, 2024
1 parent 59baca7 commit 24501d8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# SPDX-FileCopyrightText: 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only

name: nightly update

on:
schedule:
- cron: "0 3 * * *"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Update
run: ./update_all.py
16 changes: 16 additions & 0 deletions update_all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
#
# Script called by CI to update any outdated package

from utils import *

outdated_packages = get_outdated_packages()

for package in outdated_packages:
filename = package[0]
new_tag = package[2]
if not run_command(f"./update_one.py {filename} {new_tag} --pr KDAB/homebrew-tap"):
exit_because("Failed to run update_one.py")

exit(0)

0 comments on commit 24501d8

Please sign in to comment.