Skip to content

Commit

Permalink
pull from stable sqlite base, automate sb-server runner
Browse files Browse the repository at this point in the history
  • Loading branch information
mchangrh committed Oct 24, 2022
1 parent 1a83f88 commit e183f16
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-sb-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
paths:
- build/sb-server-runner/**
workflow_dispatch:
schedule:
- cron: '0 0 */10 * *'

jobs:
build:
Expand Down
3 changes: 1 addition & 2 deletions build/sb-mirror/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ csvlint() {
convert_sqlite() {
echo "Starting SQLite Conversion"
rm -f -- "${EXPORT_DIR}"/SponsorTimes.db
curl -sL https://fs.mchang.icu/pub/sponsorTimes.db -o "${EXPORT_DIR}"/SponsorTimesDB.db
# https://sponsor.ajay.app/download/sponsorTimes.db
curl -sL https://b2.ajay.app/file/sponsorblock-gh-public/sponsorTimes.db -o "${EXPORT_DIR}"/SponsorTimesDB.db

# only convert sponsorTimes for now
sqlite3 -separator ',' "${EXPORT_DIR}"/SponsorTimesDB.db ".import --skip 1 ${MIRROR_DIR}/sponsorTimes.csv sponsorTimes"
Expand Down
2 changes: 0 additions & 2 deletions build/sb-server-runner/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/sh
echo "Licenced under the MIT Licence https://github.com/ajayyy/SponsorBlockServer"

git pull

if [ -n "$DBINIT" ]; then echo '{"mode": "init-db-and-exit"}' > /app/config.json; fi
npm start
if [ -n "$DBINIT" ]; then mkdir -p /export && cp /app/databases/sponsorTimes.db /export/sponsorTimes.db; fi

0 comments on commit e183f16

Please sign in to comment.