Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,41 @@ Install and login:
email: ${{ secrets.MULTITOOL_EMAIL }}
password: ${{ secrets.MULTITOOL_PASSWORD }}
```

### Using `force` with Different Environments

MultiTool's canary mode gradually rolls out deployments with incremental traffic shifts, which provides safer deployments but takes longer to complete. However, staging and other non-production environments often don't receive enough traffic for canary mode to be effective, making the extended deployment time unnecessary.

The `force` flag allows you to skip canarying and immediately deploy with 100% traffic. This is ideal for non-production environments where you want faster deployments, while still maintaining the safety of canary deployments in production.

Here's an example using GitHub's [environments feature](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment) to deploy to both staging and production, with `force` enabled only for staging:

``` yaml
name: Deploy

on:
push:
branches: [main]

jobs:
deploy:
runs-on: ubuntu-latest
strategy:
matrix:
environment: [staging, production]
environment: ${{ matrix.environment }}
steps:
- uses: actions/checkout@v4

- name: Deploy to ${{ matrix.environment }}
uses: wack/multitool-action@v0.0.1
with:
email: ${{ secrets.MULTITOOL_EMAIL }}
password: ${{ secrets.MULTITOOL_PASSWORD }}
# Use force for staging (fast deployment), but canary for production (safe deployment)
force: ${{ matrix.environment != 'production' }}
```

This workflow will:
- Deploy to staging with `force: true` - skipping canary for faster deployments
- Deploy to production with `force: false` - using canary mode for safer, gradual rollouts