This Action runs a One-off Command in a running process. The command runs in the code of the release that is currently promoted, which makes this action a fit for post-deploy commands. To run a command such as a migration against a new release before promoting it, use Run with its release input.
Note: This action automatically allocates a pseudo-TTY for proper output streaming and color support in GitHub Actions runners.
Required The name of the Convox Rack containing the app you wish to run the command against
Required The name of the app you wish to run the command against
Required The name of the service to run the command against
Required The command you wish to run
steps:
- name: login
id: login
uses: convox/action-login@v2
with:
password: ${{ secrets.CONVOX_DEPLOY_KEY }}
- name: deploy
id: deploy
uses: convox/action-deploy@v2
with:
rack: staging
app: myapp
- name: clear cache
id: clear-cache
uses: convox/action-exec@v1
with:
rack: staging
app: myapp
service: web
command: 'rails tmp:cache:clear'
This action installs the latest Convox CLI release when its image is built, so the action's version tag does not pin the CLI. On GitHub-hosted runners that happens on every run. On a self-hosted runner with a persistent Docker daemon, the CLI stays at the version cached in that daemon until its build cache is pruned.