Files
packages/.github/workflows/update.yml
T
2022-10-20 10:19:22 +08:00

42 lines
1009 B
YAML

# for each folder in ultramarine/
# if there is chkupdate.py
# run it every 2 hours
name: Automatically check for updates
on:
schedule:
- cron: '0 */2 * * *'
workflow_dispatch:
jobs:
get-chkupdate-scripts:
runs-on: ubuntu-latest
container:
image: registry.fedoraproject.org/fedora:37
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- run: git fetch
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install rpmdev
run: dnf install rpmdevtools git python3
- name: Run Update
run: ./update.sh
- name: Save
run: |
if [[ `git status --porcelain` ]]; then
git config user.name "Package Update Checker"
git config user.email "<>"
git commit -a -m "Automatic Update"
git push -u origin main
fi