Skip to content

Update submodules #762

Update submodules

Update submodules #762

Workflow file for this run

name: Update submodules
on: workflow_dispatch
jobs:
publish_job:
runs-on: ubuntu-latest
name: Pull and update submodules
steps:
- name: Checkout contents repo
uses: actions/checkout@v4
with:
token: ${{ secrets.DWARVES_PAT }}
submodules: recursive
fetch-depth: 5
- name: Install devbox
uses: jetpack-io/devbox-install-action@v0.11.0
with:
enable-cache: true
devbox-version: 0.12.0
- name: Pull & update submodules recursively
run: |
yes | git submodule update --init --recursive --remote --progress --merge --filter=blob:none
git submodule foreach --recursive 'branch=$(git rev-parse --abbrev-ref HEAD); if [ "$(git config --get branch.$branch.remote)" = "" ]; then git checkout $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo main); fi'
- name: Export DB
shell: bash
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
devbox run duckdb-export
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
INFINITY_API_KEY: ${{ secrets.INFINITY_API_KEY }}
INFINITY_OPENAI_BASE_URL: ${{ secrets.INFINITY_OPENAI_BASE_URL }}
OLLAMA_API_KEY: ${{ secrets.OLLAMA_API_KEY }}
OLLAMA_OPENAI_BASE_URL: ${{ secrets.OLLAMA_OPENAI_BASE_URL }}
OLLAMA_BASE_URL: ${{ secrets.OLLAMA_BASE_URL }}
- name: Commit and push changes
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git submodule foreach --recursive "git add --all; git commit -m 'chore(ci): update submodule' || echo 'No changes committed'; git push"
git add --all
git commit -m "chore(ci): update submodules and reindex" || echo "No changes committed"
git push