A GitHub Action and shell installer for the Conflux CLI. Both methods download the binary from private GitHub Releases, verify its SHA-256 checksum, and make it available on PATH. The GitHub Action also caches the binary across workflow runs.
Conflux is distributed as a private release. You need a fine-grained personal access token (PAT) to download it.
- Go to GitHub > Settings > Developer settings > Fine-grained personal access tokens
- Set Resource owner to
coroslabs - Under Repository access, select Only select repositories and choose
coroslabs/conflux - Under Permissions > Repository permissions, set Contents to Read
- Generate the token and copy it
- In your consuming repository, go to Settings > Secrets and variables > Actions and create a secret named
CONFLUX_PATwith the token value
| Input | Required | Default | Description |
|---|---|---|---|
version |
No | latest |
Version to install. Use latest or a specific tag (e.g., v0.5.0). |
github-token |
Yes | — | Fine-grained PAT with contents:read on coroslabs/conflux. |
| Output | Description |
|---|---|
version |
The resolved version that was installed |
cache-hit |
Whether the binary was restored from cache |
For convenience, pin to a major version tag:
uses: coroslabs/setup-conflux@v1For stricter security (recommended in production), pin to a specific commit SHA:
uses: coroslabs/setup-conflux@<commit-sha>name: Conflux sync
on:
pull_request:
types: [opened, synchronize]
permissions:
contents: read
pull-requests: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Conflux
uses: coroslabs/setup-conflux@v1
with:
version: 'latest'
github-token: ${{ secrets.CONFLUX_PAT }}
- name: Run Conflux
run: conflux versionThe shell installer is for developer machines running macOS or Linux.
| Variable | Required | Default | Description |
|---|---|---|---|
GITHUB_TOKEN |
Yes | — | Fine-grained PAT with contents:read on the repo. |
CONFLUX_VERSION |
No | latest |
Version to install (e.g., v0.5.0). |
CONFLUX_INSTALL_DIR |
No | $HOME/.local/bin |
Directory to install the binary into. |
HTTPS_PROXY |
No | — | HTTPS proxy for environments behind a corporate proxy. |
Install the latest version:
GITHUB_TOKEN=ghp_xxx bash <(curl -fsSL https://raw.githubusercontent.com/coroslabs/setup-conflux/main/install.sh)Install a specific version:
GITHUB_TOKEN=ghp_xxx CONFLUX_VERSION=v0.5.0 bash <(curl -fsSL https://raw.githubusercontent.com/coroslabs/setup-conflux/main/install.sh)Install to a custom directory:
GITHUB_TOKEN=ghp_xxx CONFLUX_INSTALL_DIR=/usr/local/bin bash <(curl -fsSL https://raw.githubusercontent.com/coroslabs/setup-conflux/main/install.sh)After installation, ensure the install directory is on your PATH:
export PATH="$HOME/.local/bin:$PATH"If you have Go installed, you can build from source:
GOPRIVATE=github.com/phaestostech/* go install github.com/phaestostech/conflux@latestNote: The Go module path (
phaestostech) differs from the GitHub organisation (coroslabs). This is expected — the binary is distributed undercoroslabsbut the Go module is hosted underphaestostech.
- Mandatory checksum verification — both the GitHub Action and shell installer verify SHA-256 checksums from
checksums.txtbefore extracting. There is no flag to skip this step. - Token handling — the PAT is passed via environment variable and is never logged. In GitHub Actions, use repository secrets to store the token.
- No bypass flags — checksum verification cannot be disabled. If a checksum does not match, the installation fails.
| Symptom | Cause | Fix |
|---|---|---|
conflux: command not found |
Setup step missing or PATH not configured | Add the setup-conflux step before running conflux commands |
401 Unauthorized |
PAT missing, expired, or lacking scope | Verify the PAT has contents:read on coroslabs/conflux |
Checksum mismatch |
Corrupted download or tampered release | Retry the download; if persistent, check the release for corruption |
Unsupported OS/architecture |
Running on an unsupported platform | Use Linux/macOS on amd64 or arm64; Windows is supported in GitHub Actions |
| Scope | Permission | Purpose |
|---|---|---|
coroslabs/conflux |
contents:read |
Download release assets |
No other permissions are required. The token does not need write access, workflow access, or access to any other repository.