Update #4157
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: | |
autoupdate: | |
runs-on: ubuntu-latest | |
container: | |
image: registry.fedoraproject.org/fedora:37 | |
options: --cap-add=SYS_ADMIN --privileged | |
outputs: | |
updated: ${{ steps.save.outputs.updated }} | |
steps: | |
- name: Install packages | |
run: dnf install -y rpmdevtools git python | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- name: Run Update | |
run: bash ./update.sh | |
- name: Save | |
id: save | |
run: | | |
git config --global --add safe.directory "*" | |
if [[ `git status --porcelain` ]]; then | |
git config user.name "Package Update Checker" | |
git config user.email "<>" | |
git status | grep modified | sed -r "s@.+/([^/]+)/[^/]+\n?@\1 @g" | tr -d '\n' > $m | |
git commit -a -m "Automatic Update: $m" | |
git push -u origin main | |
echo "updated=1" >> $GITHUB_OUTPUT | |
fi | |
autobuild: | |
needs: autoupdate | |
if: needs.autoupdate.outputs.updated | |
uses: ./.github/workflows/autobuild.yml |