diff --git a/.drone.yml b/.drone.yml index 4622934..e30c965 100644 --- a/.drone.yml +++ b/.drone.yml @@ -42,26 +42,20 @@ 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 + # Eigenes Repo klonen (mit Token-Auth) + - git clone https://kesslerpe96777:$GITEA_TOKEN@git.efi.th-nuernberg.de/gitea/kesslerpe96777/EinfuehrungInDocker_Pipeline2.git + - cd EinfuehrungInDocker_Pipeline2 - # Repo clonen - - git clone https://git.efi.th-nuernberg.de/gitea/freudenreichan/EinfuehrungInDocker_Pipeline2.git - - cd EinfuehrungInDocker_Pipeline - - # Branch wechseln oder erstellen + # Branch wechseln oder neu erstellen - git checkout drone-artifacts || git checkout -b drone-artifacts - # Artifact löschen und neu hinzufügen - - git rm image.tar + # Altes Artifact löschen (|| true falls noch nicht da) + - git rm image.tar || true - cp $DRONE_WORKSPACE/image.tar . - git add image.tar - # Commit nur wenn Änderungen vorhanden + # Commit nur wenn Änderungen - 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 (-u beim ersten Mal damit der neue Branch upstream gesetzt wird) + - git push -u origin drone-artifacts \ No newline at end of file