-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (50 loc) · 1.78 KB
/
bootstrap.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
name: Update database
on: [push, workflow_dispatch]
env:
DB_PATH: ${{ github.workspace }}/path_to_artifacts.db
concurrency:
# Concurrency group that uses the workflow name and PR number if available
# or commit SHA as a fallback. If a new build is triggered under that
# concurrency group while a previous build is running it will be canceled.
# Repeated pushes to a PR will cancel all previous builds, while multiple
# merges to main will not cancel.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
update:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Fetch latest release
run: |
curl -L -o path_to_artifacts.tar.zst \
https://github.com/jaimergp/conda-forge-paths/releases/latest/download/path_to_artifacts.tar.zst
tar xf path_to_artifacts.tar.zst
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Update database with most recent repodata
run: |
set -x
ls -alh *.db
python conda_forge_paths/path_to_artifacts.db.py update-from-repodata
ls -alh *.db
- name: Update FTS index
run: |
set -x
ls -alh *.db
python conda_forge_paths/path_to_artifacts.db.py fts
ls -alh *.db
- name: Compress DB file
run: |
ZSTD_NBTHREADS=4 ZSTD_CLEVEL=19 tar --zstd -cf path_to_artifacts.tar.zstd $DB_PATH
ls -alh path_to_artifacts.*
- name: "Upload Artifact"
uses: actions/upload-artifact@v3
with:
name: database
path: ${{ env.DB_PATH }}.tar.zstd