From 13ef874674daa11d98bc19aa471cfdbd731298e6 Mon Sep 17 00:00:00 2001 From: Tobias Niegratschka Date: Sat, 25 Apr 2026 14:08:04 +0000 Subject: [PATCH] .drone.yml aktualisiert --- .drone.yml | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/.drone.yml b/.drone.yml index be27a96..0841ef6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -42,26 +42,22 @@ steps: - git config --global user.email "drone@ci.local" - git config --global user.name "Drone CI" - # Remote setzen - #- git remote set-url origin https://git.efi.th-nuernberg.de/gitea/freudenreichan/EinfuehrungInDocker_Pipeline2 - - # Repo clonen - - git clone https://git.efi.th-nuernberg.de/gitea/niegratschkato95684/EinfuehrungInDocker_Pipeline2.git + # Repo clonen mit Token für Schreibrechte beim Push + - git clone https://niegratschkato95684:$${GITEA_TOKEN}@git.efi.th-nuernberg.de/gitea/niegratschkato95684/EinfuehrungInDocker_Pipeline2.git - cd EinfuehrungInDocker_Pipeline2 # Branch wechseln oder erstellen - git checkout drone-artifacts || git checkout -b drone-artifacts - # Artifact löschen und neu hinzufügen - - git rm image.tar + # Artifact löschen (ignoriert Fehler, falls Datei noch nicht existiert) + - git rm image.tar || echo "image.tar not found, skipping rm" + + # Neue Datei kopieren und hinzufügen - cp $DRONE_WORKSPACE/image.tar . - git add image.tar - # Commit nur wenn Änderungen vorhanden + # Commit (ignoriert Fehler, falls keine Änderungen vorhanden sind) - git commit -m "Add built Docker image [skip ci]" || echo "Nothing to commit" - # Pull vor Push (um Konflikte zu vermeiden) - - git pull || true - - # Push - - git push \ No newline at end of file + # Push explizit auf den Branch + - git push origin drone-artifacts \ No newline at end of file