Skip to content

Publish from GitHub

Say your scripts live in a GitHub repository, one folder each. You want the version your team runs to be the one on main, without anyone publishing by hand.

In the app, open Account → API tokens and create a personal access token for this repository:

  • Workspaces: only the workspace the scripts belong to.
  • Access: Custom, then under Scripts and runs, set Scripts to View and publish (scripts:read and scripts:write). Publishing reads the script before it uploads a version, so it needs both.
  • Expires: after a year, and put a reminder in your calendar.

Publishing uses a person’s token on purpose: each version records who published it. If your workspace asks a second person to approve new versions, the workflow’s run prints the approval link and the version waits for them.

In the repository on GitHub, open Settings → Secrets and variables → Actions and add the token as a secret named REMINIX_TOKEN.

Save this as .github/workflows/publish-scripts.yml, with your workspace’s slug. It publishes only the script folders a push changed:

name: Publish scripts
on:
push:
branches: [main]
paths: ["scripts/**"]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Publish the changed scripts
env:
REMINIX_TOKEN: ${{ secrets.REMINIX_TOKEN }}
REMINIX_WORKSPACE: acme-ops
run: |
folders=""
for name in $(git diff --name-only ${{ github.event.before }} ${{ github.sha }} -- scripts | cut -d/ -f2 | sort -u); do
if [ -d "scripts/$name" ]; then folders="$folders scripts/$name"; fi
done
if [ -n "$folders" ]; then npx --yes @reminix/cli@1 publish $folders; fi

Each script is one folder under scripts/, such as scripts/monthly-report/. Reminix works out how it runs, or reads its reminix.json if it has one (see Scripts). The CLI reads the token from REMINIX_TOKEN and the workspace from REMINIX_WORKSPACE, so the workflow never logs in or writes the token to disk. It passes every changed folder to one publish, which publishes each script and fails the run if any of them fails. It skips a folder that’s gone from scripts/; archive its script in the app.

To publish every script in the folder at once, for example the first time, run reminix publish scripts/ from your own computer.

To review a version before it goes live, add --draft: the CLI uploads it as a draft, for someone to test and publish in the app.

Push a change to one script and open the workflow’s run on GitHub. It prints each version it published, for example Published monthly-report version 3. In Reminix, the script’s page lists the new version under Versions, with who published it and when.

reminix.json holds what the code needs: its command, inputs, hosts, secrets and timeout. Who may run a script, its schedules, its triggers and whether agents’ runs need approval are settings in the app (or the API), so a push never changes them.