Repository navigation
feat(action): the GitHub Mirror Action - #31
Merged
Merged
Conversation
Composite action in action/ that validates inputs, installs the pinned release (or uses binaries on PATH), materializes DASH_FORGE_KEY (dfk1 or identity JSON), configures storage via step-scoped git config, runs forge-import under a cost cap and renders a job summary with key-budget/expiry warnings. mirror-action.yml runs actionlint, shellcheck and action/test.sh on PRs and a live devnet mirror of dash-faucet twice (second run must write nothing) on dispatch/schedule/master. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Per-invocation temp dir (no stale state/summary/work dir across mirrors in one job), summary.sh writes outputs first and never fails the job on schema drift, state is saved only after a successful real run, the git work dir is removed at the end, sync/devnet-name validation is whole-string, the live test avoids the nightly's signing window and checks counts strictly, and the README warns that public events can spend the key budget. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…rt's Replace the guide's 'coming soon' section with the real workflow (uses: PastaPastaPasta/dash-forge/action@master, install 'false' until a release exists). Drop the dash.confirm/costWarnThreshold git config: forge-import enforces --max-spend per write and prices its pushes itself. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
summary.sh accepts status partial (heading 'updated with skipped items', a Skipped row from counts.skipped, a warning annotation) and labels spend as 'Spent'. mirror.sh runs forge-import without exec: exit 4 is a warning unless the new fail-on-partial input is true; 1 and 3 still fail the step. README documents statuses, exit codes and what is not mirrored. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
forge-v1 compatibility is gone project-wide. The Action never had v1 or migrate paths; this renames the fixture release tag and rewords the future @v1 action-tag note so a v1 sweep finds nothing here. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedNext included review available in 29 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (15)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the GitHub Mirror Action (UX spec §8). It is part 3 of 3 of PR G. It runs
forge-import(#30) from GitHub Actions, so a repository's code, issues, PRs, releases and labels stay mirrored into Dash Forge. The relay is #27.action/action.yml. A composite action with these inputs:repo,network/devnet-name,sync, storage (storage-kinds3 / ipfs-pinning / ipfs-api / platform, plus endpoint inputs),replicas,cost-cap,dry-run,fail-on-partial,github-repo,version/install,state-cache. Outputs:status,spent-dash,summary-json.validate.sh. Checks the inputs up front: the repo spec, the network, a numeric cost cap, and storage inputs that fit the chosen kind.mirror.sh.HOME/config dir and a storage profile from the inputs. Storage secrets come fromenv:and are never passed on argv.DASH_FORGE_KEYcan be an inlinedfk1:limited key or a CI identity file. Every piece of it is masked with::add-mask::.forge-importwith--max-spend=cost-cap,--state, which is persisted viaactions/cachewhenstate-cacheis set, and--summary-json.cap_exceeded) and 1 (error) fail the step.partial) is a warning by default, since the next run retries the skipped items.fail-on-partial: 'true'makes it fail instead.summary.sh. Turns the summary JSON into the job summary: what was written or would be written, spend against the estimate, the runner key's remaining budget and expiry, and the balance. It also emits annotations: not a limited key, key nearly used up, key expiring, each warning, and the error. Any input it can't parse is treated as an error, never as success.test.shandtestdata/. Offline tests: the summary for every status (ok,dry_run,partial,cap_exceeded,error, and garbage input), exit-code handling (0, 4, 4 withfail-on-partial, 1, 3) through a stubforge-import, and input validation..github/workflows/mirror-action.yml.action/test.sh, on every trigger.workflow_dispatchand weekly, and needs theFORGE_MOUTAI_IDENTITY_OWNERsecret. A probe job makes it show as skipped when the secret is absent. It mirrorsPastaPastaPasta/dash-faucetinto moutaimirror-ci-dash-faucetwith Platform-stored packs, then runs the Action again. The second run must reportok, write nothing and spend 0.docs/guides/mirror-a-github-repo.mdpoints at the Action, with a warning that anyone who can open an issue or PR can make a run spend, up tocost-capper event. The Action README covers the statuses, exit codes and what is not mirrored.e2e/README.mdreservesmirror-ci-dash-faucet.The Action has no forge-v1 paths. Per the owner decision, everything v1-like was removed; the only matches were an example release tag and a note about the Action's own
@v1tag, and both were reworded.Verification
action/test.sh,shellcheck action/*.shandactionlintpass locally after rebasing onto master (which now includes feat(import): forge-import on forge-v2 with dg import #30).Gaps
FORGE_MOUTAI_IDENTITY_OWNERconfigured in this repository's secrets, and aworkflow_dispatchafter merge.install: 'true'has nothing to download. The live workflow builds the binaries itself; the guide explains how to do the same.cost-capper event. The guide recommends the daily schedule alone for busy public repositories, and a limited runner key.🤖 Generated with Claude Code