Skip to content

coroslabs/setup-conflux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup Conflux

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.

Prerequisites

Conflux is distributed as a private release. You need a fine-grained personal access token (PAT) to download it.

  1. Go to GitHub > Settings > Developer settings > Fine-grained personal access tokens
  2. Set Resource owner to coroslabs
  3. Under Repository access, select Only select repositories and choose coroslabs/conflux
  4. Under Permissions > Repository permissions, set Contents to Read
  5. Generate the token and copy it
  6. In your consuming repository, go to Settings > Secrets and variables > Actions and create a secret named CONFLUX_PAT with the token value

GitHub Actions usage

Inputs

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.

Outputs

Output Description
version The resolved version that was installed
cache-hit Whether the binary was restored from cache

Version pinning

For convenience, pin to a major version tag:

uses: coroslabs/setup-conflux@v1

For stricter security (recommended in production), pin to a specific commit SHA:

uses: coroslabs/setup-conflux@<commit-sha>

Workflow example

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 version

Shell installer

The shell installer is for developer machines running macOS or Linux.

Environment variables

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.

Usage

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"

Go install

If you have Go installed, you can build from source:

GOPRIVATE=github.com/phaestostech/* go install github.com/phaestostech/conflux@latest

Note: The Go module path (phaestostech) differs from the GitHub organisation (coroslabs). This is expected — the binary is distributed under coroslabs but the Go module is hosted under phaestostech.

Security

  • Mandatory checksum verification — both the GitHub Action and shell installer verify SHA-256 checksums from checksums.txt before 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.

Troubleshooting

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

Required permissions

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.

License

MIT

About

GitHub Action to install the Conflux CLI — downloads, verifies checksums, and caches binaries from private releases

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages