Robutler

An app from a GitHub repository

You can keep an app's files in a GitHub repository and have the platform take them from there. You link one branch of one repository as the app's source. Each update takes the newest files on that branch into the app. Nothing is released until you release.

The platform never runs a build. The branch must already hold the files the app serves: files written by hand, or the output of your own build, committed by your own workflow. A template workflow is at the end of this page.

Only the app's owner links a repository.

  1. Open the app's Project window and go to Backup.
  2. Choose Use a GitHub repository as this app's source.
  3. Enter the repository as owner/name, the branch (for a built app, robutler-dist), and, if the app is one folder of the repository, that folder.
  4. Decide whether the draft keeps in step with the branch (see below), then connect. GitHub asks you to install the Robutler source app on that one repository. It asks for read access to the repository's contents and nothing else.

When you release, everyone who uses the app can download its files, also when the repository is private.

What an update does

An update fetches the tip of the linked branch and stores it as one version on the app's branch github/<branch name>. The version's note names the repository, the commit and the commit's first line.

  • Keep the draft in step on: the draft takes each update, and the draft is then changed on GitHub, not on the platform. Saving a change to the draft here is refused with Cas:SourceLinked, which names the repository. Your own branches stay editable. A draft that already has changes of its own is never replaced by an update: the link shows a warning, and you choose Replace the draft with the repository's files or stop following and merge.
  • Keep the draft in step off: updates wait on github/<branch name>. You look at what changed and merge it into the draft when you want it.

An update never releases. You release from the draft, as for any app. An update with nothing new changes nothing.

With the Robutler source app installed, a push to the linked branch starts an update within about a minute. You can also choose Update now.

What the branch may hold

In the repositoryWhat happens
Regular files and foldersTaken as they are. An executable file is taken as a plain file.
A symbolic link or a submoduleThe update fails and names the path. Remove it, or link a folder that does not contain it.
More than 10,000 filesThe update fails. Link the folder that holds the app, not the whole checkout or node_modules.
A file over 16 MiB (64 MiB for a Git LFS object), or more than 256 MiB in allThe update fails and names the limit.
A top-level folder or file named head, or named with 64 hex charactersThe update fails. Those names are part of an app's addresses.
A folder named .casfs at the topLeft out. A source repository does not set platform metadata.
A file that looks like a key or a password (key.pem, id_rsa, credentials.json)Taken, and listed as a warning on the link, and named when an agent asks you to approve a release, because a release serves it to everyone.
Files and folders whose name starts with a dotTaken, never served.

Branch names are lower case: letters, digits, ., _, - and /.

An update fetches the whole branch at its newest commit, also when you linked one folder of it, and the fetch has the same 256 MiB limit. A branch that holds only the files the app serves, like the robutler-dist branch below, keeps well under it.

A failed update leaves the app, its draft and its release as they were. The link shows the reason and the time.

The template workflow

For an app that needs a build, let GitHub Actions build it and commit the output to a branch the link names. Copy this file to .github/workflows/robutler-dist.yml in your repository and change the two lines marked CHANGE.

name: Build for Robutler

on:
  push:
    branches: [main]

permissions:
  contents: write

concurrency:
  group: robutler-dist
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: npm

      - run: npm ci
      - run: npm run build # CHANGE: your build command

      - name: Record what was built
        run: |
          mkdir -p dist/.robutler # CHANGE: `dist` is your build's output folder, here and below
          printf '{"repo":"%s","commit":"%s","workflow":"%s","runId":"%s"}\n' \
            "$GITHUB_REPOSITORY" "$GITHUB_SHA" "$GITHUB_WORKFLOW" "$GITHUB_RUN_ID" > dist/.robutler/source.json

      - name: Commit the output to robutler-dist
        run: |
          cd dist
          git init -q -b robutler-dist
          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
          git add -A
          git commit -q -m "Build of ${GITHUB_SHA::12}"
          git push -f "https://x-access-token:${{ github.token }}@github.com/${GITHUB_REPOSITORY}.git" robutler-dist

The workflow writes .robutler/source.json into the output, so the app's files say which commit of your source they were built from. The file is under a dot folder, so it is never served.

The robutler-dist branch holds one commit, replaced by each build. The platform keeps its own history of what it received, one version per update, so nothing is lost when the branch is replaced.

Disconnect

Disconnect removes the link. The files already in the app, its branches and its releases stay. If the draft was kept in step with the branch, it becomes editable here again.

On this page