n8n-sauvegarde/Sauvegarde Gitea.json

1 line
11 KiB
JSON
Raw Normal View History

2024-11-01 08:03:04 +01:00
{"createdAt":"2024-06-19T17:53:31.033Z","updatedAt":"2024-11-01T07:03:01.917Z","id":"kZvM4K7vwhKvtIkw","name":"Sauvegarde Gitea","active":true,"nodes":[{"parameters":{"rule":{"interval":[{}]}},"id":"99853d4c-6cd9-4632-b2e7-8477b61a927e","name":"Schedule Trigger","type":"n8n-nodes-base.scheduleTrigger","typeVersion":1.2,"position":[-720,160]},{"parameters":{"filters":{},"requestOptions":{}},"id":"53eab512-36c6-4b94-90d4-01ea91065bcb","name":"n8n","type":"n8n-nodes-base.n8n","typeVersion":1,"position":[-520,240],"credentials":{"n8nApi":{"id":"LPFILq2KSvbWK8vk","name":"n8n account"}}},{"parameters":{"operation":"toJson","mode":"each","options":{"fileName":"={{ $json.name }}"}},"id":"8640e0b6-dc5a-45d2-8fab-6d2713e4b896","name":"Convert to File","type":"n8n-nodes-base.convertToFile","typeVersion":1.1,"position":[-380,240]},{"parameters":{"operation":"write","fileName":"=/tmp/comp/{{ $binary.data.fileName }}.json","options":{}},"id":"d1908c71-5bfe-43fc-a109-7dc79bd844b4","name":"Read/Write Files from Disk","type":"n8n-nodes-base.readWriteFile","typeVersion":1,"position":[-220,240]},{"parameters":{"command":"mkdir -p /tmp/comp && rm -rf /tmp/repo /tmp/comp/* "},"id":"5645af60-d3af-459d-9e3f-32429ff63b4e","name":"Execute Command1","type":"n8n-nodes-base.executeCommand","typeVersion":1,"position":[-520,80]},{"parameters":{"authentication":"gitPassword","operation":"clone","repositoryPath":"/tmp/repo","sourceRepository":"https://gitea.ia86.cc/perso/n8n-sauvegarde"},"id":"df61e886-fc5c-4f04-ac03-325c3534c22a","name":"Git","type":"n8n-nodes-base.git","typeVersion":1,"position":[-220,80],"credentials":{"gitPassword":{"id":"7JHhvGSTGUGgQb6S","name":"gitea.ia86.cc account"}}},{"parameters":{"mode":"chooseBranch","output":"empty"},"id":"7da55c97-6b1e-425b-ad42-9221e2db8869","name":"Merge","type":"n8n-nodes-base.merge","typeVersion":2.1,"position":[-40,160]},{"parameters":{"operation":"status","repositoryPath":"/tmp/repo"},"id":"08ff2375-45f6-4d20-8e27-c1cc3743f0a0","name":"Git1","type":"n8n-nodes-base.git","typeVersion":1,"position":[240,160]},{"parameters":{"operation":"add","repositoryPath":"/tmp/repo","pathsToAdd":"*"},"id":"f3efec1e-b45a-40b6-b233-2fbee5170890","name":"Git2","type":"n8n-nodes-base.git","typeVersion":1,"position":[560,340]},{"parameters":{"aggregate":"aggregateAllItemData","options":{}},"id":"08ea4b96-dbb7-4e67-9c83-5e9413b886f4","name":"Aggregate","type":"n8n-nodes-base.aggregate","typeVersion":1,"position":[560,160]},{"parameters":{"errorMessage":"ERREUR DANS GIT"},"id":"f87a3c10-0adf-4004-8bf9-455305556c36","name":"Stop and Error","type":"n8n-nodes-base.stopAndError","typeVersion":1,"position":[560,0]},{"parameters":{"operation":"commit","repositoryPath":"/tmp/repo","message":"=auto: {{ $json.currentDate }}","options":{}},"id":"d08883f3-bb02-469e-bb68-b123e6048413","name":"Git3","type":"n8n-nodes-base.git","typeVersion":1,"position":[1120,160]},{"parameters":{"operation":"status","repositoryPath":"/tmp/repo"},"id":"fc6cf06a-5ac9-4bb2-a058-5f7744c2a2af","name":"Git4","type":"n8n-nodes-base.git","typeVersion":1,"position":[1260,160]},{"parameters":{"conditions":{"options":{"caseSensitive":true,"leftValue":"","typeValidation":"strict"},"conditions":[{"id":"f62f6c9f-3ef3-4b85-bfca-ae123526cbcc","leftValue":"={{ $json.ahead }}","rightValue":1,"operator":{"type":"number","operation":"equals"}}],"combinator":"and"},"options":{}},"id":"e2bb2b3c-93ea-4475-9b10-3c65dc464464","name":"If","type":"n8n-nodes-base.if","typeVersion":2,"position":[1400,160]},{"parameters":{"operation":"push","repositoryPath":"/tmp/repo","options":{}},"id":"84745a3f-a552-47cd-a671-6f9bb8e12565","name":"Git5","type":"n8n-nodes-base.git","typeVersion":1,"position":[1560,40]},{"parameters":{},"id":"8b718e16-64e2-4c47-a5ce-ec09bf60ac4d","name":"No Operation, do nothing","type":"n8n-nodes-base.noOp","typeVersion":1,"position":[1560,280]},{"parameters":{"fromEmail":"nico@ia86.cc","toEmail":"nicolas@palon.fr","subject":"=[IA86.CC] N8N Backup","html":"={{ $('ListFiles').item.json.stdout }}<br>\n<b>Hash:</b>{{ $json.hash }}<br>\n<b>Date:</b>{{ $json.date