Skip to content

Latest commit

 

History

150 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-actions

Reusable GitHub Actions for the Tempo organization.

Actions

Action Description
osv-scanner-action Scan dependencies and compare vulnerabilities with OSV
actionlint Lint GitHub Actions workflows with the digest-pinned actionlint image
docker-login Log in to GHCR and optionally Docker Hub
docker-build-push Build and push Docker images
docker-metadata-tags Standard Tempo Docker tagging strategy
cosign-sign Sign container images with cosign
publish-event POST webhook events to downstream systems
github-sts Exchange GitHub OIDC tokens for short-lived GitHub App tokens
secure-runner Start Harden Runner and install Socket Firewall with short-lived credentials
ensure-secure-runner Fail unless every workflow job starts with the secure-runner action
harden-runner Start Harden Runner with authenticated StepSecurity policy-store access, falling back to the inline policy on fork pull requests
socket-sts Exchange GitHub OIDC tokens for short-lived Socket API tokens
socket-firewall Install Aegis with a short-lived, repository-scoped Socket token
create-pull-request Commit working-tree changes and open a PR
pr-audit-comment Handle PR audit issue-comment commands
setup-rust-build Install Rust toolchain, mold linker, and sccache
setup-foundry Install Foundry toolchain from an attested release
setup-argo-cli Install Argo Workflows CLI from a signature-verified release
setup-pinact Install pinact from an attested release
setup-terraform Install Terraform verified against HashiCorp's signed checksums
setup-helm Install Helm verified against the maintainers' GPG signatures
cargo-cooldown Reject crates.io dependencies newer than the configured cooldown

Installer verification

Every tool these actions and workflows download is verified with the strongest proof its publisher offers, in addition to a checksum; a checksum from the same release cannot detect a release that was compromised end to end. The only accepted reason to skip a check is a large wall-clock cost.

3rd Party Actions

Copies of outside actions, vendored under vendor/ so they count as tempoxyz-owned under the org's Actions policy. Each copy is an exact upstream commit recorded in vendor-manifest.yml; the version column links to the upstream README at that commit. Reference them as tempoxyz/gh-actions/vendor/<owner>/<repo>[/<path>]@<commit-sha> (see Versioning), with the same inputs and outputs as upstream. To add or update one, edit the manifest with node vendor/add.mjs owner/repo@<tag> or bump ref/sha, run node vendor/sync.mjs, and commit the result; CI fails if vendor/ or this table drift from the manifest. Details of what is excluded from each copy and why are in the manifest notes.

Action Version Description
1password/install-cli-action v4.1.0 (1a3160d) Install 1Password CLI in your pipeline
1password/load-secrets-action v5.0.1 (70062d7) Make secrets from 1Password Connect available as environment variables in the next steps.
CodSpeedHQ/action v4.19.1 (f22792b) Continuous benchmarking and performance checks
DeterminateSystems/nix-installer-action v22 (ef8a148) Install Nix with the Determinate Nix Installer. See: https://github.com/DeterminateSystems/nix-installer
EmbarkStudios/cargo-deny-action v2.1.1 (3c63498) Help manage Cargo crate dependencies and validate licenses
JasonEtco/create-an-issue v2.9.2 (1b14a70) Creates a new issue using a template with front matter.
SocketDev/action main (be1f253) GitHub Action to run Socket in CLI or Firewall mode
Swatinem/rust-cache v2.9.2 (6323deb) A GitHub Action that implements smart caching for rust/cargo projects with sensible defaults.
amannn/action-semantic-pull-request v6.1.1 (48f2562) Ensure your PR title matches the Conventional Commits spec (https://www.conventionalcommits.org/).
anchore/sbom-action v0.24.0 (e22c389) Creates an SBOM (Software Bill Of Materials) from your code and container images
aquasecurity/setup-trivy v0.3.1 (81e5143) Install Trivy binary from release page
aquasecurity/trivy-action v0.36.0 (ed142fd) Scans container images for vulnerabilities with Trivy
astral-sh/setup-uv v10.0.1 (20cfd1b) Set up your GitHub Actions workflow with a specific version of uv.
aws-actions/configure-aws-credentials v6.2.3 (e6de054) Configures AWS credentials for use in subsequent steps in a GitHub Action workflow
biomejs/setup-biome main (9edb642) Setup the Biome CLI in GitHub Actions
bullfrogsec/bullfrog v0.11.1 (7dee337) Block unauthorized outbound traffic (egress) in your Github workflows
changesets/action v2.1.1 (8488615) A GitHub action to automate releases with Changesets
cloudflare/wrangler-action v4.0.0 (ebbaa15) Deploy your Cloudflare projects from GitHub using Wrangler
dblock/create-a-github-issue v3.4.0 (a25e69c) Creates a new GitHub issue using a template.
dependabot/fetch-metadata v3.1.0 (25dd0e3) Extract information from about the dependency being updated by a Dependabot-generated PR
depot/bake-action v1.13.0 (1d58c26) GitHub Action to build Docker images via Bake with Depot
depot/build-push-action v1.18.0 (98e78ad) Build and push Docker images with Depot
depot/pull-action v1.3.1 (a913e06) Pull images from the Depot ephemeral registry.
depot/setup-action v1.7.2 (91bc849) Installs the Depot CLI into the GitHub Actions environment
docker/build-push-action v7.3.0 (53b7df9) Build and push Docker images with Buildx
docker/login-action v4.6.0 (dbcb813) GitHub Action to login against a Docker registry
docker/metadata-action v6.2.0 (dc80280) GitHub Action to extract metadata (tags, labels) for Docker
docker/setup-buildx-action v4.3.0 (37fe631) Set up Docker Buildx
docker/setup-docker-action v5.1.0 (b2189fb) Set up Docker for use in GitHub Actions by downloading and installing a version of Docker CE
docker/setup-qemu-action v4.2.0 (96fe6ef) Install QEMU static binaries
dtolnay/rust-toolchain stable (4360b52) Install the Rust toolchain
expo/expo-github-action 9.0.0 (eab7a23) Publish, build or manage your Expo app with GitHub Actions
google-github-actions/auth v3.0.0 (7c6bc77) Authenticate to Google Cloud from GitHub Actions via Workload Identity Federation or service account keys.
google-github-actions/setup-gcloud v3.0.1 (aa5489c) Downloads, installs, and configures a Google Cloud SDK environment. Adds the gcloud CLI command to the $PATH.
goreleaser/goreleaser-action v7.2.3 (f06c13b) GitHub Action for GoReleaser, a release automation tool for Go projects
gradle/actions v6.3.0 (9c97196) A collection of actions for building Gradle projects, as well as generating a dependency graph via Dependency Submission.
helm/chart-releaser-action v1.7.0 (cae68fe) Host a Helm charts repo on GitHub Pages
helm/chart-testing-action v2.8.0 (6ec842c) Install the Helm chart-testing tool
imjasonh/setup-crane v0.7 (feee3b6) Install and authorize crane
jakebailey/pyright-action v3.0.2 (8ec14b5) Run pyright
jaxxstorm/action-install-gh-release v3.0.0 (25e24d2) Install binaries from GitHub releases
jayanta525/github-pages-directory-listing v4.0.0 (624ac8c) Github Action to generate directory listing index for Github Pages
lycheeverse/lychee-action v2.9.0 (e747777) Quickly check links in Markdown, HTML, and text files
mobile-dev-inc/action-maestro-cloud v2.0.2 (3490606) Upload your app to Maestro Cloud to run your Flows in CI
mozilla-actions/sccache-action v0.0.11 (fc920bf) Setup sccache action
openai/codex-action v1.12 (8636508) Run codex exec with a prompt.
oven-sh/setup-bun v2.2.0 (0c5077e) Download, install, and setup Bun to your path.
peaceiris/actions-gh-pages v4.1.0 (84c30a8) GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.
peter-evans/create-pull-request v8.1.1 (5f6978f) Creates a pull request for changes to your repository in the actions workspace
planetscale/setup-pscale-action v1 (b6a50ee) Installs the PlanetScale CLI
pnpm/action-setup v6.0.10 (0977fd9) Install pnpm package manager
ruby/setup-ruby v1.321.0 (95ef2b0) Download a prebuilt Ruby and add it to the PATH in 5 seconds
rust-lang/crates-io-auth-action v1.0.5 (c6f97d4) Retrieve a temporary crates.io access token using trusted publishing.
shallwefootball/upload-s3-action v1.3.3 (4350529) Upload directory to S3
sigstore/cosign-installer v4.1.2 (6f9f177) Installs cosign and includes it in your path
step-security/harden-runner v2.21.1 (e14015d) Harden-Runner provides runtime security for GitHub-hosted and self-hosted runners
taiki-e/install-action v2.85.2 (41049aa) GitHub Action for installing development tools
tailscale/github-action v3.3.0 (6cae46e) Connect your GitHub Action workflow to Tailscale
tailscale/gitops-acl-action v1.5.1 (4105afd) Push changes to Tailscale and run ACL tests in CI
wevm/frog v1 (702c4ea)
zizmorcore/zizmor-action v0.6.2 (3dc1ecc) Run zizmor from GitHub Actions 🌈

Usage

Reference actions using tempoxyz/gh-actions/actions/<name>@main (pin to a commit SHA in production — see Versioning):

steps:
  - uses: tempoxyz/gh-actions/actions/setup-rust-build@main
    with:
      toolchain: stable
      components: clippy,rustfmt

  - uses: tempoxyz/gh-actions/actions/docker-login@main
    with:
      ghcr-token: ${{ secrets.GITHUB_TOKEN }}

  - uses: tempoxyz/gh-actions/actions/publish-event@main
    with:
      url: ${{ secrets.EVENTS_ARGS }}
      event-type: registry_package
      tag: sha-${{ steps.shortsha.outputs.shortsha }}

Secure runner

Use secure-runner as the first step in a job. It uses the production STS endpoints by default; set dev: true to use the development endpoints.

jobs:
  test:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      id-token: write
    steps:
      - name: Secure runner
        uses: tempoxyz/gh-actions/actions/secure-runner@<commit-sha>

      - uses: actions/checkout@<commit-sha>

      - run: make test

The default fallback egress policy is audit. Set egress-policy: block and, if needed, allowed-endpoints for workflows that should fail closed when no stored policy applies. The nested Harden Runner wrapper performs its STS exchange in its pre-job entrypoint before starting Harden Runner, because Harden Runner fetches its policy in its own pre-job entrypoint. The short-lived API key is passed only to the vendored Harden Runner process and is revoked during post-job cleanup.

Versioning

Examples in this repo use @main for brevity. For production, pin to a full commit SHA — branch refs like @main are mutable, and the bundled scan-github-actions workflow flags unpinned uses. Add a trailing reference comment; the optional pinact policy check requires one for bare SHA pins, and it also improves readability:

uses: tempoxyz/gh-actions/actions/setup-rust-build@<commit-sha> # main

This repo does not yet publish version tags; SHA pinning is the recommended stable reference.

Reusable Workflows

Workflow Description Source
pr-audit Publish a pr_audit event when a PR is labeled (read-only) tempo, zones
label-prs Label new PRs from their linked issue tempo, zones
scan-github-actions Security scan, lint, and optional action pin policy checks any
dependency-scan Detect newly introduced dependency vulnerabilities with OSV Linux, macOS, Windows
reproducible-build Reproducible build verification tempo
rust-lint Shared Rust clippy, fmt, typos, and deny checks rust repos
rust-deny Deny-only wrapper around rust-lint rust repos
rust-fmt Formatting-only wrapper around rust-lint rust repos
rust-clippy Clippy-only wrapper around rust-lint rust repos
rust-build-binaries Build Rust binaries and upload artifacts rust repos
cargo-update-pr Open a scheduled cargo update PR tempo
auto-assign-pr Auto-assign the author to their PR tempo

Reference reusable workflows using tempoxyz/gh-actions/.github/workflows/<name>.yml@main (pin to a commit SHA in production — see Versioning).

pr-audit

Publishes a pr_audit event when a pull request receives a configured label. This reusable workflow is read-only against repository contents. Comment-driven audit commands are handled separately by the pr-audit-comment composite action in a caller-owned job (see below).

Label audits (read-only)

name: PR Audit

on:
  pull_request:
    types: [labeled]

jobs:
  pr-audit:
    uses: tempoxyz/gh-actions/.github/workflows/pr-audit.yml@main
    permissions:
      contents: read
    with:
      environment: pr-audit
      required-labels: |
        cyclops
        agentic-audit
    secrets:
      EVENTS_KEY: ${{ secrets.EVENTS_KEY }}
      EVENTS_CERT: ${{ secrets.EVENTS_CERT }}
      EVENTS_ARGS: ${{ secrets.EVENTS_ARGS }}

Optional inputs:

  • required-label — label that triggers audit publishing (default: cyclops); kept for compatibility
  • required-labels — comma or newline-separated labels that trigger audit publishing; when set, this overrides required-label
  • environment — GitHub Environment name, such as pr-audit, used to gate audit publishing
  • branch / pr-number — target for ad-hoc workflow_dispatch callers
  • require-completed-audit — publish a Cyclops audit run merge-gate status (default: false)

When require-completed-audit: true, internal and non-Dependabot pull requests remain pending until tempoxyz-bot posts a completed Cyclops review; fork and Dependabot pull requests are exempt. Completed reviews remain valid after later commits. The caller must add pull_request_target, pull_request_review, and merge_group triggers, grant pull-requests: read and statuses: write, and require the resulting Cyclops audit run status on the protected branch. Reusable workflows cannot declare caller event triggers.

on:
  pull_request:
    types: [labeled]
  pull_request_target: # zizmor: ignore[dangerous-triggers]
    types: [opened, reopened, synchronize, labeled, unlabeled]
  pull_request_review:
    types: [submitted]
  merge_group:

jobs:
  pr-audit:
    uses: tempoxyz/gh-actions/.github/workflows/pr-audit.yml@main
    permissions:
      contents: read
      pull-requests: read
      statuses: write
    with:
      require-completed-audit: true
    secrets:
      EVENTS_KEY: ${{ secrets.EVENTS_KEY }}
      EVENTS_CERT: ${{ secrets.EVENTS_CERT }}
      EVENTS_ARGS: ${{ secrets.EVENTS_ARGS }}

Repos that need protected environment gates, such as Zones' environment: pr-audit gate for EVENTS_*, should pass environment: pr-audit so the publish job preserves that approval boundary.

Comment-command audits (opt-in, privileged)

Because comment handling needs issues: write and pull-requests: read, it lives in a caller-owned job that runs the pr-audit-comment composite action rather than in the read-only reusable workflow. Add it alongside the label job:

on:
  pull_request:
    types: [labeled]
  issue_comment:
    types: [created]

jobs:
  pr-audit:
    uses: tempoxyz/gh-actions/.github/workflows/pr-audit.yml@main
    permissions:
      contents: read
    with:
      environment: pr-audit
    secrets:
      EVENTS_KEY: ${{ secrets.EVENTS_KEY }}
      EVENTS_CERT: ${{ secrets.EVENTS_CERT }}
      EVENTS_ARGS: ${{ secrets.EVENTS_ARGS }}

  pr-audit-comment:
    if: >-
      github.event_name == 'issue_comment' &&
      github.event.issue.pull_request &&
      (
        startsWith(github.event.comment.body, 'cyclops audit') ||
        startsWith(github.event.comment.body, 'cyclops private audit') ||
        startsWith(github.event.comment.body, '@decofe cyclops audit') ||
        startsWith(github.event.comment.body, '@decofe cyclops private audit') ||
        startsWith(github.event.comment.body, 'derek audit')
      )
    runs-on: ubuntu-latest
    environment: pr-audit
    permissions:
      contents: read
      issues: write
      pull-requests: read
    steps:
      - uses: tempoxyz/gh-actions/actions/pr-audit-comment@main
        with:
          command-regex: '^(?:@decofe\s+)?(?:cyclops\s+(?:private\s+)?audit|derek\s+audit)\b'
          permission-check-mode: association
          allowed-associations: OWNER,MEMBER
          organization: tempoxyz
          events-key: ${{ secrets.EVENTS_KEY }}
          events-cert: ${{ secrets.EVENTS_CERT }}
          events-args: ${{ secrets.EVENTS_ARGS }}
          github-token: ${{ github.token }}

The comment surface supports:

  • comments: cyclops audit, cyclops private audit, @decofe cyclops audit, derek audit
  • arguments: private, fast, perf, iterations=N, hours=N, config=PATH, models=..., run-label=LABEL, dry-run, note="..."

Set permission-check-mode: org (with organization) for org-membership API checks. Use permission-token when those checks need a token distinct from the one used for PR reads and status comments:

          permission-check-mode: org
          organization: tempoxyz
          github-token: ${{ secrets.DEREK_BENCH_TOKEN }}
          permission-token: ${{ secrets.DEREK_BENCH_ACK_TOKEN }}

If permission-token is omitted, membership checks use github-token as before. In association mode, allowed-associations controls which GitHub commenter associations may trigger an audit. It defaults to OWNER,MEMBER,COLLABORATOR. In both permission modes, authorization applies to the commenter, not the pull request author, so a trusted commenter can audit a pull request from an external fork. allow-same-author is deprecated, has no effect, and remains accepted only for compatibility with existing callers.

label-prs

Labels newly opened pull requests by copying eligible labels from the issue linked in the pull request body.

name: Label PRs

on:
  pull_request:
    types: [opened]

jobs:
  label-prs:
    uses: tempoxyz/gh-actions/.github/workflows/label-prs.yml@main
    permissions:
      contents: read
      issues: write

Caller workflows must grant these permissions on the reusable-workflow job. contents: read is needed to check out tempoxyz/gh-actions; issues: write reads issue labels and adds labels to the pull request through GitHub's Issues API.

The reusable workflow checks out tempoxyz/gh-actions at github.workflow_sha, so the bundled label script matches the pinned reusable workflow revision.

scan-github-actions

The dedicated scan-github-actions-ci.yml caller runs on pull requests and pushes to main in this repository, scanning .github actions with actionlint and pinact enabled. This includes the secure-runner policy check; CI does not invoke a separate scan or policy-check job. The reusable workflow only declares workflow_call.

Security scan and lint for GitHub Actions workflows: zizmor for security and actionlint (with shellcheck/pyflakes) for workflow syntax and run: script correctness. Findings appear as GitHub workflow annotations and in the workflow log. The lint pass can be turned off with actionlint: false.

Set pinact: true to also run pinact in check-only mode. This enforces a default seven-day minimum age for pinned action commits and adds optional version-comment verification without editing files or adding a second reusable-workflow job. Caller-local Pinact configuration is merged on top of the trusted default source and can override its threshold, so repository configuration remains review-sensitive. Existing callers remain unchanged because the pinact check is opt-in.

zizmor, actionlint, and the optional pinact policy run together in a single Scan GitHub Actions check. The reusable workflow is read-only against repository and Actions data and never requests security-events: write. To upload SARIF to GitHub code scanning, use the composite action with advanced-security: true in a job you control (see its README).

name: Scan GitHub Actions

on:
  push:
    branches: [main]
  pull_request:

jobs:
  scan:
    uses: tempoxyz/gh-actions/.github/workflows/scan-github-actions.yml@main
    permissions:
      actions: read
      contents: read
    with:
      pinact: true

By default zizmor scans the whole repo, so first-party workflows and actions anywhere (e.g. across a monorepo) are covered. Repos that vendor third-party workflows/actions can narrow zizmor's scope with the paths input (e.g. to .github/) to avoid flagging code they don't own. Pinact uses its own file discovery; monorepos with action manifests outside its defaults can set files in their Pinact configuration.

Optional inputs:

  • paths (default: .) — whitespace-separated paths for zizmor to scan; narrow to e.g. .github/ to exclude vendored or third-party trees
  • config — path to a zizmor config file for rule overrides. When empty and the repository has no zizmor config of its own, the scan uses a default that disables zizmor's ref-version-mismatch audit: this repository publishes no version tags, so a version comment on a pin to it can never match and every such pin would otherwise be a medium-severity finding that fails the scan. Comment correctness for third-party pins is covered by pinact's verify-pin-comments. Add a .github/zizmor.yml to a repo to take back full control.
  • actionlint (default: true) — run actionlint (syntax, expression, and shellcheck/pyflakes checks) alongside the zizmor scan
  • pinact (default: false) — run pinact policy checks alongside zizmor and actionlint
  • pin-config (default: .pinact.yaml) — path to the caller repo's pinact configuration file; the default is optional when absent
  • pin-no-api (default: false) — perform offline pin validation without API-based comment or minimum-age verification
  • verify-pin-comments (default: false) — verify that semver version comments resolve to the pinned SHA
  • verify-pin-min-age (default: true) — verify current pins against configured minimum-age rules
  • pin-min-age (default: 7) — default minimum age in days for pinned action commits; caller-local Pinact configuration can override it

dependency-scan

Dependency Scan scans base and proposed revisions with our osv-scanner-action, then compares results to find new vulnerabilities. Works on private repositories without GitHub Code Security or Advanced Security. Uses Tempo-owned actions and GitHub’s actions/checkout and actions/upload-artifact. Native OSV binaries are installed from GitHub releases and verified against pinned checksums and SLSA provenance. Docker and Go are not required; the action uses Node.js 20+ for installation and reporting on Linux, macOS, and Windows.

name: Dependency Scan

on:
  pull_request:
  merge_group:

permissions: {}

jobs:
  scan:
    uses: tempoxyz/gh-actions/.github/workflows/dependency-scan.yml@main
    permissions:
      contents: read
      id-token: write

Pin production callers to a full commit SHA. The dedicated dependency-scan-ci.yml caller runs this workflow on this repository's pull requests and merge groups on Linux, macOS, and Windows. It starts with secure-runner; the OIDC permission is for runner protection, and no GitHub/OIDC credentials are forwarded to the native child processes.

By default, scans compare the event's base SHA with its merge SHA, including the proposed merge result. Other events require both base-ref and head-ref; pull_request_target and workflow_run are rejected. Both checkouts disable credential persistence. Results live in an isolated runner temporary directory that survives switching revisions. Native scans use the runner’s filesystem permissions; there is no container or read-only mount.

New vulnerabilities fail the job by default. Existing findings are baselined using OSV's occurrence-count and source/package/advisory comparison semantics. fail-on-vuln: false makes findings informational; scanner failures and missing or malformed results still fail. A revision with no supported dependency files is allowed and produces an empty inventory, so a PR can introduce its first lockfile or remove its last one. OSV-supported lockfiles, SBOMs, and manifests are scanned; unresolved or unsupported dependencies are not an assurance of safety. Call analysis is disabled.

Results appear as annotations and in the job summary. Base/head JSON, diff JSON, Markdown, and SARIF are retained together as an Actions artifact for five days, including when the vulnerability gate fails. Nothing is uploaded to Code Scanning, and no security-events: write or pull-requests: write permission is required.

Input Default Description
scan-args --recursive then ./ One source scan argument per line; format/output/call-analysis flags are managed internally
fail-on-vuln true Fail on newly introduced vulnerabilities
base-ref, head-ref Event base/merge SHAs Explicit revision overrides
checkout-submodules false Recursively check out submodules
runs-on ubuntu-latest Linux, macOS, or Windows runner with Node.js 20+
timeout-minutes 20 Job timeout
artifact-name dependency-scan Set a unique name for each matrix invocation

The vulnerabilities-found workflow output is true or false after a completed comparison. Configure OSV exclusions with osv-scanner.toml or scan-args; each revision's scanner configuration applies to its scan.

Migration from dependency-review.yml: change the workflow path and required status check names, remove old inputs/secrets, and remove pull-requests: write. The old workflow defaulted to warning only; use fail-on-vuln: false to retain that behavior. License policy, package deny lists, Scorecard, PR comments, and the old action's JSON outputs are not carried over. Previously SHA-pinned callers continue using the old implementation until their pins are updated.

reproducible-build

Builds a repository's byte-deterministic binary using scripts/reproducible-build.sh, writes a sha256 file, and uploads it as a short-lived artifact.

name: Reproducible Build

permissions: {}

on:
  push:
    branches: [main]
  workflow_dispatch:
    inputs:
      ref:
        description: "Git ref (branch, tag, or full SHA) to build reproducibly"
        type: string
        required: false
        default: "main"

concurrency:
  group: reproducible-build-${{ github.ref }}-${{ github.event_name }}
  cancel-in-progress: ${{ github.event_name == 'push' }}

jobs:
  build:
    uses: tempoxyz/gh-actions/.github/workflows/reproducible-build.yml@main
    permissions:
      contents: read
    with:
      ref: ${{ inputs.ref }}
      binary-name: tempo

Caller workflows must grant contents: read so the reusable workflow can check out the repository being built.

Required input:

  • binary-name — name of the binary produced in out/

Optional inputs:

  • ref — Git ref to check out
  • target (default: x86_64-unknown-linux-gnu)
  • build-script (default: ./scripts/reproducible-build.sh)
  • runs-on (default: depot-ubuntu-latest-16)
  • retention-days (default: 7)

rust-lint

Runs a common Rust lint set: cargo clippy, cargo fmt, typos, and cargo deny. All checks run by default and can be enabled or disabled independently.

name: Lint

on:
  push:
    branches: [main]
  pull_request:
  merge_group:

permissions: {}

jobs:
  lint:
    uses: tempoxyz/gh-actions/.github/workflows/rust-lint.yml@main
    permissions:
      contents: read
      id-token: write

Optional inputs:

  • run-clippy, run-fmt, run-typos, run-deny (default: true) — enable each check independently
  • rust-toolchain (default: nightly) — used for clippy and fmt
  • deny-rust-toolchain (default: stable) — installed on the deny runner and used inside the cargo-deny container
  • clippy-flags (default: --all-targets --all-features --locked)
  • fmt-flags (default: --all --check)
  • deny-flags (default: --all-features)
  • checkout-submodules (default: false) — passed to clippy checkout only
  • clippy-runner, fmt-runner, typos-runner, deny-runner, timeout-minutes

For individual checks, use rust-deny, rust-fmt, or rust-clippy.

The deny action runs in Docker and manages its own Rust toolchain; deny-rust-toolchain is forwarded to its rust-version input. Callers grant contents: read for checkout and id-token: write for Harden Runner OIDC/STS authentication. Pin production callers to a commit SHA (see Versioning).

The lint success gate accepts explicitly disabled checks and fails on failures, cancellations, or unexpected skips. If all four checks are disabled, only the gate runs and succeeds.

rust-deny

Runs cargo deny check all through rust-lint.yml at the same commit, with clippy, fmt, and typos disabled internally. It shares the existing Harden Runner setup, checkout, Rust installation, cargo-deny container, and lint success gate.

jobs:
  deny:
    uses: tempoxyz/gh-actions/.github/workflows/rust-deny.yml@main
    permissions:
      contents: read
      id-token: write
    with:
      rust-toolchain: nightly

Optional inputs:

  • rust-toolchain (default: stable) — installed on the runner and used inside the cargo-deny container
  • flags (default: --all-features) — additional flags passed to cargo deny check all
  • runner (default: ubuntu-latest)
  • timeout-minutes (default: 30) — timeout for each job, including the success gate

The example explicitly selects nightly; omitting with uses stable. Callers must grant both permissions shown above; no persistent StepSecurity API key is required. Pin production callers to a commit SHA (see Versioning). The additional workflow nesting can change displayed check names, so verify required status checks when switching an existing caller from rust-lint.

rust-fmt and rust-clippy

Run only formatting or Clippy through rust-lint.yml at the same commit, sharing its STS-backed Harden Runner and success gate. Other checks are disabled internally. Clippy also retains the shared mold/sccache setup and warnings-as-errors policy.

jobs:
  fmt:
    uses: tempoxyz/gh-actions/.github/workflows/rust-fmt.yml@main
    permissions:
      contents: read
      id-token: write
  clippy:
    uses: tempoxyz/gh-actions/.github/workflows/rust-clippy.yml@main
    permissions:
      contents: read
      id-token: write

Both accept rust-toolchain (default nightly), runner (default ubuntu-latest), timeout-minutes (default 30), and flags. Formatting defaults to --all --check; Clippy defaults to --all-targets --all-features --locked. Clippy additionally accepts checkout-submodules (default "false"). Use Linux runners supported by the shared Harden Runner setup; Clippy's mold installer requires Linux.

Pin production callers to a commit SHA. Preserve existing cooldown prerequisites with needs, explicitly carry over custom flags, and update required check names if nesting changes them. Both permissions shown above are required for checkout and STS authentication; no persistent StepSecurity API key is needed.

rust-build-binaries

Builds one or more Rust binaries with cargo build --locked --bin <binary> --profile <profile> and uploads each binary as an artifact. Callers must commit an up-to-date Cargo.lock; the build fails if it is missing or dependency resolution would change it.

name: Build binaries

on:
  workflow_dispatch:

permissions: {}

jobs:
  build:
    uses: tempoxyz/gh-actions/.github/workflows/rust-build-binaries.yml@main
    permissions:
      contents: read
    with:
      profile: release
      binaries: |
        api-server
        worker
        cli

Required input:

  • binaries — newline-separated binary names to build and upload
  • profile — Cargo build profile

Optional inputs:

  • rust-toolchain (default: stable)
  • runs-on (default: depot-ubuntu-latest-16)
  • checkout-submodules (default: false)
  • artifact-path-template (default: target/{profile}/{binary})
  • retention-days (default: 7)
  • timeout-minutes (default: 60)

cargo-update-pr

Runs cargo update and opens or updates a pull request for Cargo.lock. The branch push and PR use a short-lived GitHub App token minted via github-sts — the built-in GITHUB_TOKEN is not allowed to create pull requests.

jobs:
  cargo-update-pr:
    uses: tempoxyz/gh-actions/.github/workflows/cargo-update-pr.yml@main
    permissions:
      contents: read
      id-token: write

The calling repository must carry a trust policy at .github/sts/cargo-update-pr.sts.yaml that grants its own workflow contents: write and pull_requests: write, for example:

subject: repo:tempoxyz@<org-id>/<repo>@<repo-id>:ref:refs/heads/main
permissions:
  contents: write
  pull_requests: write

Optional inputs:

  • rust-toolchain (default: nightly)
  • title (default: chore(deps): weekly cargo update)

auto-assign-pr

Assigns newly opened or reopened pull requests to their author when the author is an internal collaborator.

name: Auto Assign PR to Author

on:
  pull_request:
    types: [opened, reopened]

permissions:
  issues: write
  pull-requests: write

jobs:
  auto-assign:
    uses: tempoxyz/gh-actions/.github/workflows/auto-assign-pr.yml@main

Caller workflows must grant issues: write and pull-requests: write.

About

Reusable GitHub Actions for Tempo

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages