This commit is contained in:
parent
6bc9946078
commit
f83476b471
46
.drone.yml
Normal file
46
.drone.yml
Normal file
@ -0,0 +1,46 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
include:
|
||||
- cron
|
||||
- custom
|
||||
|
||||
steps:
|
||||
- name: Reddit Save
|
||||
image: python:3.11
|
||||
privileged: true
|
||||
environment:
|
||||
HETZNER_USER:
|
||||
from_secret: hetzner_username
|
||||
HETZNER_KEY:
|
||||
from_secret: hetzner_key
|
||||
REDDIT_USERNAME:
|
||||
from_secret: REDDIT_USERNAME
|
||||
REDDIT_PASSWORD:
|
||||
from_secret: REDDIT_PASSWORD
|
||||
REDDIT_CLIENT_ID:
|
||||
from_secret: REDDIT_CLIENT_ID
|
||||
REDDIT_SECRET:
|
||||
from_secret: REDDIT_SECRET
|
||||
commands:
|
||||
- apt update && apt install -y sshfs
|
||||
- mkdir $${HOME}/reddit-save
|
||||
- mkdir $${HOME}/.ssh
|
||||
- chmod 700 $${HOME}/.ssh
|
||||
- echo "$${HETZNER_KEY}" > $${HOME}/.ssh/id_ed25519
|
||||
- chmod 600 $${HOME}/.ssh/id_ed25519
|
||||
- cp ./known_hosts $${HOME}/.ssh
|
||||
- sshfs -p 23 $${HETZNER_USER}@u309229.your-storagebox.de:reddit-save $${HOME}/reddit-save
|
||||
- pip3 install -r requirements.txt
|
||||
- python3 save.py saved $${HOME}/reddit-save/saved
|
||||
- python3 save.py upvoted $${HOME}/reddit-save/upvoted
|
||||
|
||||
|
||||
image_pull_secrets:
|
||||
- registry
|
2
known_hosts
Normal file
2
known_hosts
Normal file
@ -0,0 +1,2 @@
|
||||
|1|z2izyEgiMEMXpw90jg0e1ISllhc=|sT2TrIky19K4oxuOX72ikIyXlKY= ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAGK0po6usux4Qv2d8zKZN1dDvbWjxKkGsx7XwFdSUCnF19Q8psHEUWR7C/LtSQ5crU/g+tQVRBtSgoUcE8T+FWp5wBxKvWG2X9gD+s9/4zRmDeSJR77W6gSA/+hpOZoSE+4KgNdnbYSNtbZH/dN74EG7GLb/gcIpbUUzPNXpfKl7mQitw==
|
||||
|1|dqv6tJGy56u8qZnwjPPD2jf+j+I=|kP5pemnOAbC8NuznJOYvLbqT3uo= ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAGK0po6usux4Qv2d8zKZN1dDvbWjxKkGsx7XwFdSUCnF19Q8psHEUWR7C/LtSQ5crU/g+tQVRBtSgoUcE8T+FWp5wBxKvWG2X9gD+s9/4zRmDeSJR77W6gSA/+hpOZoSE+4KgNdnbYSNtbZH/dN74EG7GLb/gcIpbUUzPNXpfKl7mQitw==
|
Loading…
Reference in New Issue
Block a user