SponsorBlockServer/.github/workflows/generate-sqlite-base.yml
2022-12-18 00:01:32 -05:00

40 lines
No EOL
1 KiB
YAML

name: create-sqlite-base
on:
push:
branches:
- master
paths:
- databases/**
workflow_dispatch:
jobs:
make-base-db:
name: Generate SQLite base .db
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- name: Set config
run: |
echo '{"mode": "init-db-and-exit"}' > config.json
- name: Run Server
timeout-minutes: 10
run: npm start
- uses: actions/upload-artifact@v3
with:
name: SponsorTimesDB.db
path: databases/sponsorTimes.db
- uses: mchangrh/s3cmd-sync@f4f36b9705bdd9af7ac91964136989ac17e3b513
with:
args: --acl-public
env:
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
S3_BUCKET: ${{ secrets.S3_BUCKET }}
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
S3_ACCESS_KEY_SECRET: ${{ secrets.S3_ACCESS_KEY_SECRET }}
SOURCE_DIR: 'databases/sponsorTimes.db'