Skip to content

About

This repository is dedicated to hosting reusable GitHub Actions YAML files that can be shared across different repositories.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

572 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Shared Actions Repository

This repository hosts reusable GitHub Actions workflows and composite actions shared across deriv-com repositories.

It holds two kinds of reusable entrypoints:

  • Reusable workflows (.github/workflows/*.yml) — called from another repo with jobs.<id>.uses:
  • Composite actions (.github/actions/<name>/action.yml) — called from a step with uses:

Everything here is consumed at @master, so changes are live for every consumer as soon as they merge. There is no release gate; the v1–v4 tags are stale and referenced by nothing. Treat every change as immediately org-wide, and prefer changes that are revertable in one commit.

Reusable workflows

Workflow Purpose Docs Status
ai-pr-review.yml Pluggable LLM PR review (kimi | anthropic | grok | codex | muse | antigravity) AI_PR_REVIEW_README.md ✅ active
forge.yml Turns an issue into a verified PR (auto), or revises/updates an open PR (revise | update) via the Forge engine (formerly spec-to-pr); pr-text applies PR text changes forge-agent requests from Slack Forge ✅ active
dependonme-bot.yml Auto-fixes Dependabot security alerts and opens/auto-merges fix PRs DEPENDONME_BOT_README.md ✅ active
qa-checklist.yml Generates a QA checklist for a PR when someone comments @checkmaite QA_CHECKLIST_README.md ✅ active
archive-on-merge.yml Archives completed OpenSpec changes into a follow-up PR when a PR merges Archive on Merge ✅ active
claude-pr-review.yml Legacy standalone Claude PR review Migration guide ⚠️ deprecated → use ai-pr-review.yml with engine: anthropic

(Repository-internal workflows lint-actions.yml and ai-review.yml validate and dogfood this repo itself and are not workflow_call entrypoints.)

Deprecations

Workflow Replacement Notes
claude-pr-review.yml ai-pr-review.yml with engine: anthropic Still a standalone duplicate — converting it into a delegating shim is a tracked follow-up. See the migration guide. Do not delete until consumers are migrated and deprecation telemetry has been silent for 30 days.
docsync-ai.yml and the docsync_ai, docsync_ai_comment, docsync_guidance_file actions None Removed. DocSync AI is decommissioned. A caller now fails with "workflow not found": delete the calling workflow (usually .github/workflows/DocSyncAI.yml) and its DOCSYNC_* secrets.

Add a row here when deprecating anything. With no CHANGELOG and no release process, this table is the only coordination mechanism the repo has.

Composite actions

Consumer-facing composite actions

Action Purpose Docs
archive_on_merge Detects completed OpenSpec changes on a merged PR and runs openspec archive README
generate_app_info Writes app-info.json containing the release version tag README
npm_install Restores/saves node_modules cache keyed on package-lock.json and runs npm ci —
post_preview_build_comment Posts an in-progress preview build sticky comment and check run on a PR —
post_preview_link_comment Updates the preview sticky comment and check run with deployment URL or failure status —
publish_to_pages_branch Deploys a compiled frontend directory to a Cloudflare Pages preview branch —
publish_to_pages_production Deploys a compiled frontend directory to Cloudflare Pages main —
send_slack_notification Sends a Block Kit message to a Slack incoming webhook —
sync_crowdin_translation_with_cloudflare Pulls Crowdin branch translations and uploads them to Cloudflare R2 —
vercel_DR_publish Builds, deploys, and aliases a disaster-recovery deployment on Vercel —
verify_user_in_organization Verifies that a GitHub username is an active deriv-com org member —

Example step usage in a consumer workflow:

      - name: Post preview build comment
        id: post_preview_build_comment
        uses: "deriv-com/shared-actions/.github/actions/post_preview_build_comment@master"
        with:
          issue_number: ${{ steps.pr_information.outputs.issue_number }}
          head_sha: ${{ github.event.workflow_run.head_sha }}

Workflow-internal composite actions

The remaining directories under .github/actions/ implement internal building blocks for the reusable workflows above (prefer calling the parent workflow rather than invoking these directly):

Forge: issue to PR

The engine moved from deriv-com/spec-to-pr to deriv-com/forge-agent under engine/, and is released there as vX.Y.Z tags (the old v0.3.0–v0.8.4 tags were carried over unchanged).

forge.yml runs the Forge engine from deriv-com/forge-agent against an issue (command: auto) or an open same-repo PR (command: revise | update), handling GitHub App token rotation, AI review wait/revise loops, base-branch updates, and optional Slack progress threads. command: pr-text runs no engine: it applies a PR title or description edit, a reply to the reviewers, thread resolution, or a close or reopen that forge-agent left as a request on the issue, with this workflow's write App. Any other command is rejected before anything runs, and the Slack thread that asked is told. Full caller header and input reference live at the top of forge.yml.

The engine and the target repo's toolchain run on node_version, which defaults to the Node the engine release names; the job stops early, before any install, if node_version doesn't satisfy the engine's engines.node.

App info (version stamp)

generate_app_info creates or updates an app-info.json file in the build output directory containing the production tag. Full docs: generate_app_info README.

      - name: Generate app-info.json
        uses: "deriv-com/shared-actions/.github/actions/generate_app_info@master"
        with:
          version: ${{ github.event.inputs.tag }} # the production tag
          output_dir: dist # optional, defaults to "."

Output file:

{ "version": "<the tag passed>" }

Archive on Merge (openspec)

When a PR that completes an openspec change merges, archive it and open a follow-up PR (never pushes directly to a protected branch).

Thin caller in the consumer repo:

name: Archive on Merge
on:
  pull_request:
    types: [closed]
    branches: [master]
permissions:
  contents: write
  pull-requests: write
jobs:
  archive:
    if: github.event.pull_request.merged == true
    uses: deriv-com/shared-actions/.github/workflows/archive-on-merge.yml@master
    with:
      # Required — must match the workflow ref in `uses:` above.
      action_ref: master
    permissions:
      contents: write
      pull-requests: write

Required input: action_ref (same ref as the workflow uses: pin). Optional: base_branch (default master), node_version (default 22), openspec_version (default 1.6.0).

The detect/archive script is also available as a composite action: archive_on_merge.

Local validation and testing

lint-actions.yml gates pull requests in this repository. Run the same checks locally before pushing (Node 22+ and Bash; zero npm install required):

# 1. Node unit tests for composite action scripts (path guards, archive-on-merge)
node --test .github/actions/**/*.test.js

# 2. Workflow & composite-action contract suites
bash tests/ai-pr-review-contract.sh
bash tests/qa-checklist-contract.sh
bash tests/forge-contract.sh
bash tests/forge-pr-text.sh
bash tests/forge-resolver.sh

# 3. Workflow static analysis (actionlint 1.7.12, shellcheck disabled to match CI)
actionlint -shellcheck=

About

This repository is dedicated to hosting reusable GitHub Actions YAML files that can be shared across different repositories.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages