-
Notifications
You must be signed in to change notification settings - Fork 1
91 lines (76 loc) · 2.51 KB
/
index.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Index update
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 6 * * 0'
permissions:
contents: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Checkout submodules
run: git submodule update --init
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Index (sparse)
run: python3 index.py -d idlib.sqlite
# - name: Index (full)
# run: |
# python3 index.py -m full --no-prune -d idlib-full-unpruned.sqlite
# cp idlib-full-unpruned.sqlite idlib-full.sqlite
# python3 index.py --prune-only -d idlib-full.sqlite
# - name: Compress databases
# run: |
# zstd -10 -k idlib.sqlite
# zstd -10 -k idlib-full.sqlite
# zstd -10 -k idlib-full-unpruned.sqlite
- name: Compress database
run: |
zstd -10 -k idlib.sqlite
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: Database Release ${{ github.run_number }}
tag_name: db_release-${{ github.run_number }}
draft: false
prerelease: false
- name: Upload idlib.sqlite.zst
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./idlib.sqlite.zst
asset_name: idlib.sqlite.zst
asset_content_type: application/octet-stream
# - name: Upload idlib-full-unpruned.sqlite.zst
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./idlib-full-unpruned.sqlite.zst
# asset_name: idlib-full-unpruned.sqlite.zst
# asset_content_type: application/octet-stream
# - name: Upload idlib-full.sqlite.zst
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: ./idlib-full.sqlite.zst
# asset_name: idlib-full.sqlite.zst
# asset_content_type: application/octet-stream