Skip to content

feat: add disable_lock input to bypass deployment locking#453

Open
mohammad19991 wants to merge 4 commits intogithub:mainfrom
mohammad19991:main
Open

feat: add disable_lock input to bypass deployment locking#453
mohammad19991 wants to merge 4 commits intogithub:mainfrom
mohammad19991:main

Conversation

@mohammad19991
Copy link

Problem

For workflows like iOS/Android builds that upload to TestFlight or the Play Store, deployment locking is irrelevant — each artifact upload is additive and independent, so concurrent deployments can never conflict.

Currently, the action always acquires a lock before deploying, adding unnecessary friction (and potential failures) in these scenarios.

Solution

Add a new boolean input disable_lock (default: false) that completely bypasses all locking logic when set to true.

When enabled:

  • .lock and .unlock commands reply with an informational comment instead of modifying lock state
  • Lock acquisition is skipped before deployment starts
  • Lock check and release are skipped in the post-deploy step

Normal locking behavior is fully preserved when disable_lock is false (the default), so this is a non-breaking change.

Example usage

- uses: github/branch-deploy@vX
  with:
    disable_lock: "true"

Adds a new boolean input `disable_lock` that completely skips all
locking logic when set to true. Useful for workflows where concurrent
deployments are safe (e.g. iOS/Android uploads to TestFlight/Play Store)
since each artifact upload is additive and independent.

When enabled:
- .lock and .unlock commands return an informational message instead
  of modifying lock state
- Lock acquisition is skipped during deploy
- Lock check and release are skipped in post-deploy
- Add tests for disable_lock in main.test.js:
  - deploy with disable_lock skips lock acquisition
  - .lock command returns informational comment and safe-exit
  - .unlock command returns informational comment and safe-exit
- Add test for disable_lock in post-deploy.test.js:
  - skips lock check and release when disable_lock is true
- Rebuild dist via npm run all (format + lint + package)
- Add disable_lock row to the inputs table in README.md
- Add "Disabling Locks" section to docs/locks.md explaining the use
  case (e.g. iOS/Android uploads to TestFlight/Play Store) and the
  behavior when the option is enabled
@GrantBirki
Copy link
Contributor

👋 Hey @mohammad19991 this looks great! I can see the use case for this and think a non-breaking new input flag is the right way to do this. You will need to update this file action.schema.yml to include the new input option.

@mohammad19991
Copy link
Author

👋 Hey @mohammad19991 this looks great! I can see the use case for this and think a non-breaking new input flag is the right way to do this. You will need to update this file action.schema.yml to include the new input option.

I appreciate your feedback @GrantBirki. disable_lock has been added to action.schema.yml. Let me know if there's anything else needed.

@GrantBirki
Copy link
Contributor

We tag in @nobe4 as our review buddy to run CI and make sure it's all green!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants