releasetools/Advisory lock service for CI/CD pipelines

Prevents race conditions in CI workflows by ensuring mutual exclusion: only one job can access shared resources concurrently

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit May 17, 2026
License
Apache 2.0

Pinned Snippet

workflow.ymlSHA-pinned
uses: releasetools/mutex@c43feb89589aa9acd7b35652ab0338fe04b17126 # v1.0.1

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
GITHUB_TOKENGitHub token used to authenticate API requests. Pass it from "secrets.GITHUB_TOKEN". Can also be specified as an environment variable.no
DATABASE_URLDatabase credentials for storing the locks.no
commandThe command to execute: 'lock' or 'release'.yes
idAn unique identifier for the lock.yes
reasonOptional: Why was the lock acquired in the first place?no""
expirationDefines the lock's expiration. Defaults to 60 seconds.no60
max-waitThe maximum time to wait for a lock, in seconds. Use -1 to wait for a time equal to the lock duration - this is the default behavior.no-1
poll-intervalThe time to wait between retrying to acquire a lock, in seconds. Defaults to every 10 seconds.no10
auto-releaseDecides if the lock should be automatically released at the end of the job. Defaults to true.notrue
disable-pr-updatesDecides if a status update comment should be posted on a PR when the lock is acquired or released. Defaults to true.nofalse
SLACK_BOT_TOKENSpecify a Slack bot token (xoxb-...) to post updates to a channel. Needs the `chat:write` permission. Can also be passed as an environment variable. If not specified, no Slack notifications will be sent.no
slack-channelThe channel ID where to post Slack notifications. Required if SLACK_BOT_TOKEN is specified.no
namedescription
statusThe status of the action: 'locked', 'released', 'failed', or 'skipped'.