This is a GitHub Action that will run a runbook in Octopus Deploy.
Important
As of v3 of this action, Octopus Server version 2022.3.5512
or newer is required.
Please refer to the migration guide if moving between major versions of this action.
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'
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. |
Name | Description |
---|---|
project |
Required. The name of the project associated with this runbook. |
runbook |
Required. The name of the runbook. |
environments |
Required. A list of environments in Octopus Deploy in which to run (i.e. Dev, Test, Prod). Each environment should be added on a new line. |
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. |
git_ref |
Git branch reference to the specific resources of a version controlled Octopus Project. This is required for version controlled projects. E.g. ${{ github.ref }} to use the branch or tag ref that triggered the workflow. |
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-action to wait for any/all of these tasks. |
Contributions are welcome! ❤️ Please read our Contributing Guide for information about how to get involved in this project.