Install the fj CLI on a runner (checksum-pinned, from your Forgejo releases) and auth it with the workflow token. No github.com.
  • Shell 88.5%
  • Makefile 11.5%
Find a file
Stephen Way fa500019f3
All checks were successful
test / unit (push) Successful in 4s
test / e2e (push) Successful in 7s
Fetch releases anonymously first (cross-repo token 404s)
The job token is scoped to this repo, so sending it on a cross-repo read
of the public fj releases 404s. Releases are public, so try anonymously
first and fall back to the token only for a private mirror. Fixes the
e2e install.
2026-06-01 19:14:00 -07:00
.forgejo/workflows Initial release: setup-fj-action 2026-06-01 19:10:31 -07:00
scripts Fetch releases anonymously first (cross-repo token 404s) 2026-06-01 19:14:00 -07:00
tests Initial release: setup-fj-action 2026-06-01 19:10:31 -07:00
.gitignore Initial release: setup-fj-action 2026-06-01 19:10:31 -07:00
action.yml Initial release: setup-fj-action 2026-06-01 19:10:31 -07:00
CHANGELOG.md Initial release: setup-fj-action 2026-06-01 19:10:31 -07:00
LICENSE Initial release: setup-fj-action 2026-06-01 19:10:31 -07:00
Makefile Initial release: setup-fj-action 2026-06-01 19:10:31 -07:00
README.md Initial release: setup-fj-action 2026-06-01 19:10:31 -07:00

Setup fj

The fj CLI on your runner. Install a checksum-verified fj binary from your own Forgejo releases, put it on PATH, and authenticate it with the workflow's token, so any later step can fj pr, fj run, fj api, fj workflow run. No github.com.

Part of the Fjord Actions bundle. The foundation the fj-CLI-native actions build on.

Usage

jobs:
  orchestrate:
    runs-on: [self-hosted, Linux]
    steps:
      - uses: https://rasterhub.com/rasterstate/setup-fj-action@v1
        with:
          version: latest        # or a pinned tag like v0.1.3
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

      - run: fj pr list --json number,title
      - run: fj workflow run deploy.yml --ref main

Inputs

Input Default Description
version latest fj tag to install, or latest.
repository rasterstate/fj Repo publishing fj releases.
download-base <server>/<repo>/releases/download Override the download base URL / mirror.
authenticate true Run fj auth login with the token.
host GITHUB_SERVER_URL host Forgejo host for fj.
token GITHUB_TOKEN env Token for download (private repos) + auth.

Outputs

Output Description
version The fj version installed.

Notes

  • Releases are pulled from your Forgejo instance and verified against the release's SHA256SUMS. Supported platforms: linux-x86_64, darwin-aarch64, darwin-x86_64.
  • Auth is best-effort. fj auth login stores the token in the OS keychain; a keychain-less CI runner can't store it, so the action warns and continues (fj is still installed and FJ_HOST is exported). On such runners, pass the token per command, or run on a host-mode runner with a keyring. The install itself always works.

License

MIT, see LICENSE.