diff --git a/.gitea/workflows/catch-up.yml b/.gitea/workflows/catch-up.yml new file mode 100644 index 0000000..554f3c5 --- /dev/null +++ b/.gitea/workflows/catch-up.yml @@ -0,0 +1,35 @@ +name: Catch up cinny submodule + +# [matrix #9] cinny's CI only bumps the submodule at most once an hour (its +# trigger-desktop job is debounced), so web commits that land inside that +# window would otherwise never reach a desktop build. This nightly run (or a +# manual dispatch) moves the submodule to cinny's current `lotus` HEAD; the +# resulting push starts release.yml as usual. No-op when already current. +on: + schedule: + - cron: '0 4 * * *' + workflow_dispatch: + +jobs: + catch-up: + runs-on: ubuntu-latest + steps: + - name: Bump cinny submodule to lotus HEAD + env: + TOKEN: ${{ secrets.RELEASE_TOKEN }} + run: | + git clone "https://x-access-token:$TOKEN@code.lotusguild.org/LotusGuild/cinny-desktop.git" desktop + cd desktop + git config user.email "ci@lotusguild.org" + git config user.name "Lotus CI" + git submodule update --init cinny + git -C cinny fetch origin lotus + git -C cinny checkout origin/lotus + git add cinny + if git diff --cached --quiet; then + echo "Submodule already at lotus HEAD, nothing to do" + else + SHA=$(git -C cinny rev-parse HEAD) + git commit -m "chore: bump cinny submodule to ${SHA:0:8} (nightly catch-up)" + git push origin main + fi