Build Indexes #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Indexes | |
on: workflow_dispatch | |
permissions: | |
contents: write | |
jobs: | |
build_index: | |
runs-on: "ubuntu-latest" | |
container: "python:3.11.8" | |
env: | |
CI_COMMIT_MESSAGE: Continuous Integration Autobuild | |
CI_COMMIT_AUTHOR: Continuous Integration | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
mkdir -p ~/.cache/pip | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Build indexes | |
run: | | |
mkdir -p world | |
python3.11 build_index.py -o world/world4.idx -p 4 -t 10 | |
python3.11 build_index.py -o world/world5.idx -p 5 -t 10 | |
python3.11 build_index.py -o world/world6.idx -p 6 -t 10 | |
- name: GIT Commit Artifacts | |
run: | | |
git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | |
git config --global user.email "username@users.noreply.github.com" | |
git add world | |
git commit -m "${{ env.CI_COMMIT_MESSAGE }}" && git push || true |