Skip to content

OctopusDeploy/push-build-information-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

push-build-information-action

This is a GitHub Action to push build information to Octopus Deploy.

This action captures the following build information:

  • BuildNumber: The unique ID of the build that was triggered.
  • BuildUrl: The link to the build that was triggered.
  • Branch: The branch or tag name that triggered the build.
  • VcsRoot: The URL to the GitHub repository.
  • VcsCommitNumber: The commit SHA that triggered the build.
  • Commits: List of commits that was part of the build.
    • Please note: Commits will only be included when a workflow is triggered by a push event.

Examples

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

env:
  OCTOPUS_URL: ${{ secrets.OCTOPUS_URL }} # address of Octopus Deploy instance (i.e. https://demo.octopus.app)
  OCTOPUS_API_KEY: ${{ secrets.OCTOPUS_API_KEY }} # API key used with Octopus Deploy instance
  OCTOPUS_SPACE: '<spacename>' # or you can specify a Space ID
steps:
  - uses: actions/checkout@v2
  - name: Push build information to Octopus Deploy 🐙
    uses: OctopusDeploy/push-build-information-action@v3
    with:
      packages: |
        <packageId1>
      version: '<versionofpackages>'

📥 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
packages A multi-line list of packages to push build information to Octopus Deploy.
version The version of the package(s).
branch The branch name, if omitted the GitHub ref will be used.
overwrite_mode Determines the action to perform with build information if it already exists in the repository. Valid input values are FailIfExists (default), OverwriteExisting, and IgnoreIfExists.
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.

🤝 Contributions

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