Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
octopusdeploy

GitHub Action

Run Runbook in Octopus Deploy

v3.0.0

Run Runbook in Octopus Deploy

octopusdeploy

Run Runbook in Octopus Deploy

GitHub Action to run a runbook in Octopus Deploy

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Run Runbook in Octopus Deploy

uses: OctopusDeploy/[email protected]

Learn more about this action in OctopusDeploy/run-runbook-action

Choose a version

run-runbook-action

This is a GitHub Action will run a runbook in Octopus Deploy. It requires the Octopus CLI; please ensure to include install-octopus-cli-action in your workflow (example below) before using this GitHub Action.

Migration Guide(s)

Please refer to the migration guide if moving between major versions of this action.

Examples

Incorporate the following actions in your workflow to push a package to Octopus Deploy using an API key, a target instance (i.e. server), and a project:

steps:
  - name: Run a runbook in Octopus Deploy 🐙
    uses: OctopusDeploy/run-runbook-action@v3
    env:
      OCTOPUS_API_KEY: ${{ secrets.API_KEY  }}
      OCTOPUS_URL: ${{ secrets.SERVER }}
      OCTOPUS_SPACE: 'Outer Space'
    with:
      project: 'Test Project'
      runbook: 'Test Runbook'
      environments: [ |
        'Dev'
        'Test']

✍️ Environment Variables

Name Description
OCTOPUS_URL The base URL hosting Octopus Deploy (i.e. https://octopus.example.com). It is strongly recommended that this value retrieved from a GitHub secret.
OCTOPUS_API_KEY The API key used to access Octopus Deploy. It is strongly recommended that this value retrieved from a GitHub secret.
OCTOPUS_SPACE The Name of a space within which this command will be executed.

📥 Inputs

Name Description
project Required. The name of the project associated with this runbook.
runbook Required. The name of the runbook.
environments Required. A comma-delimited list of environments in Octopus Deploy in which to run (i.e. "Dev,Test,Prod").
variables A multi-line list of prompted variable values. Format: name:value.
server The instance URL hosting Octopus Deploy (i.e. "https://octopus.example.com/"). The instance URL is required, but you may also use the OCTOPUS_URL environment variable.
api_key The API key used to access Octopus Deploy. An API key is required, but you may also use the OCTOPUS_API_KEY environment variable. It is strongly recommended that this value retrieved from a GitHub secret.
space The name of a space within which this command will be executed. The space name is required, but you may also use the OCTOPUS_SPACE environment variable.

📤 Outputs

Name Description
server_tasks JSON array of objects containing the Octopus Deploy server tasks Ids (serverTaskId) and environment name (environmentName), and tenant name (tenantName) if the run was for a tenant, for the executions tasks that were queued. Use the await-task-actionto wait for any/all of these tasks.

🤝 Contributions

Contributions are welcome! ❤️ Please read our Contributing Guide for information about how to get involved in this project.