Skip to content

auto: recompile all from 0b447772 #148

auto: recompile all from 0b447772

auto: recompile all from 0b447772 #148

name: Recompile Examples
on:
push:
branches: ["**"] # https://stackoverflow.com/a/64635612/14658879
jobs:
recompile-all:
# don't recompile on pushes to main (we don't want content to change outside prs),
# or on pushes from the elebot to prs (this would create infinite recursive loops)
if: github.ref != 'refs/heads/main' && github.actor != 'ecoscope-elebot'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
# todo: track token refresh intervals and update this as needed
token: ${{ secrets.ECOSCOPE_ELEBOT_PAT }}
fetch-depth: 0 # get tags so that hatch-vcs version is correct
- name: Install pixi
run: curl -fsSL https://pixi.sh/install.sh | bash && echo "$HOME/.pixi/bin" >> $GITHUB_PATH
- name: Recompile all
run: pixi run --manifest-path pixi.toml recompile-all
# https://github.com/actions/checkout?tab=readme-ov-file#push-a-commit-to-a-pr-using-the-built-in-token
- name: Push changes from recompile
run: |
LATEST_HUMAN_COMMIT=$(git rev-parse --short HEAD)
git config user.name "ecoscope-elebot"
git config user.email "[email protected]"
git add .
git commit -m "auto: recompile all from $LATEST_HUMAN_COMMIT"
git push origin ${{ github.head_ref }}
# for potential usefulness in debugging, upload the artifacts from the build-release step
# which is performed by pixi during `recompile-all`. but do this after we've pushed changes
# from the recompile to the pr branch, so we don't delay ci starting against those changes.
- name: Log conda channel contents
run: ls -lR /tmp/ecoscope-workflows/release/artifacts
- name: Upload conda channel
uses: actions/upload-artifact@v4
with:
name: release-artifacts
path: |
/tmp/ecoscope-workflows/release/artifacts/
!/tmp/ecoscope-workflows/release/artifacts/bld
!/tmp/ecoscope-workflows/release/artifacts/src_cache
if-no-files-found: error
compression-level: 0