vollständige umstellung auf gitea repo
This commit is contained in:
1 parent
3a807da54c
commit
079e69963d
9 files changed
+426
-39
No files matched your search
@@ -0,0 +1,49 @@
|
||||
name: Update Scoop manifests
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 * * * *'
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
code: write
|
||||
timeout-minutes: 55
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ gitea.event.repository.default_branch }}
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check Python runtime
|
||||
run: python3 -c "import sys; assert sys.version_info >= (3, 10), 'Python 3.10+ erforderlich'"
|
||||
|
||||
- name: Test manifest updater
|
||||
run: python3 -B -m unittest discover -s tests -v
|
||||
|
||||
- name: Update manifests
|
||||
id: update
|
||||
run: python3 -B scripts/update-manifests.py --write
|
||||
|
||||
# Gültige Updates auch dann speichern, wenn ein anderer Download scheitert.
|
||||
# Der fehlgeschlagene Update-Schritt bleibt im Workflow sichtbar.
|
||||
- name: Commit and push changed manifests
|
||||
if: ${{ always() && steps.update.outcome != 'skipped' }}
|
||||
env:
|
||||
DEFAULT_BRANCH: ${{ gitea.event.repository.default_branch }}
|
||||
run: |
|
||||
set -eu
|
||||
git add -- bucket/*.json
|
||||
if git diff --cached --quiet; then
|
||||
echo 'Keine Manifest-Änderungen.'
|
||||
exit 0
|
||||
fi
|
||||
git config user.name 'Gitea Actions'
|
||||
git config user.email 'actions@gitea.medelexis.ch'
|
||||
git commit -m 'Update Scoop manifests'
|
||||
git pull --rebase origin "$DEFAULT_BRANCH"
|
||||
git push origin "HEAD:$DEFAULT_BRANCH"
|
||||
Reference in new issue
Block a user