Skip to content

Update submodules #308

Update submodules

Update submodules #308

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: Debounce 10s
uses: zachary95/github-actions-debounce@v0.1.0
with:
wait: 10
- name: Checkout contents repo
uses: actions/checkout@v4
with:
token: ${{ secrets.DWARVES_PAT }}
submodules: recursive
- name: Install devbox
uses: jetpack-io/devbox-install-action@v0.9.0
with:
enable-cache: true
devbox-version: 0.10.5
- 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: |
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 }}
- name: Commit
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: update submodules' || echo 'No changes committed'; git push"
git submodule foreach --recursive "git add --all; git commit -m 'chore: update submodules' || echo 'No changes committed'; git push"
git add --all
git commit -m "chore(deploy): update submodules and reindex" || echo "No changes committed"
git push