cnuss/Run once
Run a bash script exactly once across concurrent jobs that share a key. One job wins, runs the script, and caches its stdout; every other job downloads that same output. Distributed run-once / leader election built on the Actions cache service.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| key | Cache key. All jobs that run this action with the same key elect a single winner; the winner runs `run`, the rest reuse its output. Use a key that is unique to the work you want done once (e.g. include a run id, or a content hash for memoization across runs). | yes | — |
| run | Bash script executed only on the winning job. Its stdout becomes the `output`. A non-zero exit fails every racer (the winner's exit code and output are propagated to the losers). | yes | — |
| timeout-seconds | How long a losing job waits for the winner to finalize before failing. | no | 600 |
Outputs
| name | description |
|---|---|
| output | Stdout of the winning job's script — identical for every racer. |