Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smithers Cloud GitHub Action

smithersai/action dispatches a repository workflow on Smithers Cloud (the Plue service at api.jjhub.tech), follows its durable run, and fails the GitHub job if Cloud CI fails. Build and test commands execute on Cloud runners. The GitHub runner only dispatches and monitors the run; it still needs to be able to start a GitHub Actions job.

Usage

Connect and synchronize your source repository in Smithers Cloud first. The Cloud repository slug may differ from its GitHub slug. Give a dedicated automation token workflow write access and save it as the GitHub repository secret SMITHERS_CI_TOKEN.

name: CI
on:
  push:
    branches: [main]
  pull_request:
  workflow_dispatch:
permissions:
  contents: read
jobs:
  ci:
    runs-on: ubuntu-24.04
    timeout-minutes: 65
    steps:
      - uses: smithersai/action@main # Pin the published commit for reproducible CI.
        with:
          token: ${{ secrets.SMITHERS_CI_TOKEN }}
          repository: ${{ vars.SMITHERS_CI_REPOSITORY }}
          workflow: CI

Declare on.manualDispatch() on the Cloud workflow. The action calls POST /api/repos/{owner}/{repo}/workflows/{name}/dispatch with {ref, inputs}, then reads GET /api/repos/{owner}/{repo}/runs/{id}. It does not upload code, configure mirrors, create repositories, or deploy your service.

The action verifies trigger_commit_sha against the GitHub event commit. For pull_request, this is the PR head SHA and branch, not the generated merge commit. Synchronize that branch to Cloud before dispatch. Fork PRs require an explicitly configured source synchronization and credential policy; GitHub normally withholds secrets on fork events. Do not switch to pull_request_target to bypass that restriction.

Inputs

Input Default Purpose
token required Cloud API automation token
api-url https://api.jjhub.tech HTTPS API origin (/api suffix also accepted)
repository github.repository Connected Cloud owner/name
workflow CI Workflow name
ref PR head branch or github.ref_name Cloud bookmark to execute
sha GitHub event commit (PR head SHA) Expected immutable tested commit
inputs-json {} JSON object of manual-dispatch inputs
wait true Wait for completion and propagate failure
timeout-minutes 60 Overall dispatch/monitoring deadline, at most 350
poll-seconds 15 Poll interval, at most 300

Set the GitHub job timeout a few minutes above the action timeout to allow cancellation cleanup. Timeouts, interrupted monitoring, stale revisions, and API errors fail the job and attempt to cancel any active run. Dispatch requests are never retried automatically because the API does not offer an idempotency key.

Outputs: run-id, run-url (the authenticated Cloud run API URL), and status. wait: false verifies the run revision and returns its current status; a queued run is not proof that CI passed. Use the default wait mode for required checks.

Development

Requires Node 24. No dependency install or bundling step is needed: dist/index.js is the source and runtime artifact.

npm test
npm run check

About

Official GitHub Action for delegating CI to Smithers Cloud

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages