Skip to content

Commit

Permalink
Update details around version controlled projects (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-richardson committed May 3, 2023
1 parent 1c3646c commit 0ff6b70
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ steps:
project: 'MyProject'
```
To use an version controlled Octopus project, add the `git_ref` and `git_commit` fields:

```yml
env:
OCTOPUS_API_KEY: ${{ secrets.API_KEY }}
OCTOPUS_URL: ${{ secrets.OCTOPUS_URL }}
OCTOPUS_SPACE: 'Outer Space'
steps:
# ...
- name: Create a release in Octopus Deploy 🐙
uses: OctopusDeploy/create-release-action@v3
with:
project: 'MyProject'
git_ref: ${{ (github.ref_type == 'tag' && github.event.repository.default_branch ) || (github.head_ref || github.ref) }}
git_commit: ${{ github.event.after || github.event.pull_request.head.sha }}
```

## ✍️ Environment Variables

| Name | Description |
Expand All @@ -55,7 +72,7 @@ steps:
| `package_version` | The version number of all packages to use for this release. |
| `packages` | A multi-line list of version numbers to use for a package in the release. Format: StepName:Version or PackageID:Version or StepName:PackageName:Version. StepName, PackageID, and PackageName can be replaced with an asterisk ("\*"). An asterisk will be assumed for StepName, PackageID, or PackageName if they are omitted. |
| `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. |
| `git_commit` | Git commit pointing to the specific resources of a version controlled Octopus Project. If empty, it will use the HEAD from the corresponding gitRef parameter. E.g. `${{ github.sha }}` to use the commit SHA that triggered the workflow. |
| `git_commit` | Git commit pointing to the specific resources of a version controlled Octopus Project. This is required for version controlled projects. E.g. `${{ github.event.after || github.event.pull_request.head.sha }}` to use the commit that triggered the workflow. |
| `ignore_existing` | Ignore existing releases if present in Octopus Deploy with the matching version number. Defaults to **false** |
| `release_notes` | The release notes text associated with the new release (Markdown is supported). |
| `release_notes_file` | A file containing the release notes associated with the new release (Markdown is supported). Use either `release_notes` or this input, supplying both is not supported. |
Expand Down

0 comments on commit 0ff6b70

Please sign in to comment.