Using the Force... Automated Git Pull?

Currently reading
Using the Force... Automated Git Pull?

245
47
NAS
DS918+, DS414j
Operating system
  1. Linux
  2. Windows
  3. other
Mobile operating system
  1. Android
Hi,
I've got no idea where to post this, so here goes.
I use multiple github sites for various things.
Examples are:
Which I download the zip to and extract it to /volume2/docker/theme

Which I download as a zip and extract to /volume1/Valheim/BepInEx

I'm after a way of automating the processes but have no idea where to start.
I was hoping there might be some non-synology app way of doing this as I'd like to be able to move it onto any NAS/machine I might need to.

Any help would be hugely appreciated.
 
That's where I'm a little hazy on how to set it up. I'd love to automatically pull the repo to the relevant folder every evening, but I've no idea how to. I'd rather not use any syno package and (due to git being used to build containers) I've been unable to find a guide for what I would like to do.
Any pointers would be wonderful. :)
 
That's where I'm a little hazy on how to set it up.
as in git pull or download of the release zip + extraction?

The git approach is way easier, but does require an spk to actualy install the git client. You'd need to clone each repo once and then create a scheduled task that changes into the git-folder and just run "git pull" to update the code base. This is as easy as it gets. Though, as you don't want to use any spk packages at all, this approach won't be possible.

The other approach would require your to curl the github release page, extract the download link, download the zip and extract the zip.

Which approach are you looking for?
 
Probably the git pull. I can hopefully set up the git client on a new system and link it all up again.
It makes more sense to me to do it that way.
Of note I've not had a chance to read this yet, but I'm trying to keep things all in one place:
 
Last edited:
Wonderful.
In case anyone else is interested:
Clone the repo:

Code:
docker run -ti --rm -v /volume2/docker/git:/git alpine/git clone https://github.com/GilbN/theme.park.git docker-mods
Then add a bash alias:
Code:
alias themes='docker run -ti --rm -v /volume2/docker/git/theme.park:/git alpine/git pull https://github.com/GilbN/theme.park.git docker-mods &&rsync -av --delete /volume2/docker/git/theme.park/ /volume1/theme.park-docker-mods/'
So now if I run themes it'll pull the update and then copy it to the correct location. :)

I'm sure there's an easier way, but I'm relatively pleased with my initial work.
I can now add a scheduled task which runs the command in the alias but can also run it at will without trying to remember that.

Thank you @one-eyed-king for your help.
 
@one-eyed-king Always inspired. :) I love learning new things. I think that knowing there's someone there who can advise makes all the difference. I spend my life supporting others in my job (having very little safety net of my own) just knowing you've got one makes all the difference.
I've been back with questions at least 5 times today (in fact due to the start to my day I gave up at the beginning of all of this) which I've then spent the extra time thinking about and solved myself.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

Hello! Chrome Remote Desktop is generally safe, but there are always potential risks. To enhance...
Replies
1
Views
777
Welcome to the forum. While testing this over your phone is that over GSM or WIFI?
Replies
1
Views
623
This is crazy... and they are saying this was all due to a Plex media RCE exploit Plex media server seen...
Replies
2
Views
1,574
I can confirm that it is working as described in the tutorial!
Replies
1
Views
5,497
Hello, I reached this thread by chance so I don’t know if my answer is still of any values. But I'm using...
Replies
8
Views
3,067
  • Question
My Synology DDNS wildcard cert needs to be renewed. I was curious if this can be done via NPM docker. My...
Replies
0
Views
1,351
D
I think if someone is running a small business that requires such protection by a regulatory or an...
Replies
4
Views
1,541

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top