this repo has no description
1name: Rebuild database
2
3on:
4 workflow_dispatch:
5 schedule:
6 - cron: "0 0 * * *" # Every day at midnight
7
8permissions:
9 contents: write
10
11jobs:
12 rebuild-database:
13 runs-on: ubuntu-latest
14 name: Rebuild database
15 steps:
16 - name: Checkout repository
17 uses: actions/checkout@v6
18 with:
19 ssh-key: ${{ secrets.AUTOCOMMIT_KEY }}
20 - name: Install native dependencies
21 run: |
22 sudo add-apt-repository ppa:alessandro-strada/ppa --yes
23 sudo apt update
24 sudo apt-get install --yes imagemagick curl unzip jq google-drive-ocamlfuse
25 - name: Install ffmpeg
26 uses: FedericoCarboni/setup-ffmpeg@v3
27 - name: Install github cli
28 uses: sersoft-gmbh/setup-gh-cli-action@v3
29 - name: Setup Go
30 uses: actions/setup-go@v6
31 with:
32 go-version: "1.26.1"
33 - name: Install ortfo/db
34 run: |
35 go install github.com/ortfo/db/cmd@v1.7.2
36 mv ~/go/bin/cmd /usr/bin/ortfodb
37 - name: Write service account key file
38 uses: mobiledevops/secret-to-file-action@v1
39 with:
40 base64-encoded-secret: ${{ secrets.GOOGLE_DRIVE_CLIENT_SERVICE_ACCOUNT_KEY_BASE64 }}
41 filename: .serviceaccount.json
42 working-directory: ./
43 is-executable: false
44 - name: Setup projects directory
45 run: mkdir -p ~/projects
46 - name: Setup google drive directory
47 run: |
48 google-drive-ocamlfuse -id ${{ secrets.GOOGLE_DRIVE_CLIENT_ID }} -secret ${{ secrets.GOOGLE_DRIVE_CLIENT_SECRET }} -serviceaccountpath .serviceaccount.json
49 google-drive-ocamlfuse ~/projects
50 - name: Rebuild database
51 run: ortfodb --scattered build database.json
52 env:
53 GH_TOKEN: ${{ github.token }}