feat: add git_resources input for per-step Git resource refs (SF-2251)#705
Open
NickJosevski wants to merge 1 commit into
Open
feat: add git_resources input for per-step Git resource refs (SF-2251)#705NickJosevski wants to merge 1 commit into
NickJosevski wants to merge 1 commit into
Conversation
Adds a 'git_resources' multi-line input mapping to the release-create API's GitResources field, so a release can target a specific Git ref for a step's Git resource at creation time (format: StepName:GitRef or StepName:GitResourceName:GitRef). This lets version-controlled/Argo projects deploy a feature branch from GitHub Actions by pointing steps like 'Update Argo CD Application Manifests' at the pushed branch (SF-2251). Depends on OctopusDeploy/api-client.ts#280 (adds GitResources to CreateReleaseCommandV1). Dependency bump + dist rebuild are deferred to ready-time once that ships. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
NickJosevski
marked this pull request as ready for review
July 20, 2026 01:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a new
git_resourcesaction input that lets a release target a specific Git reference for a step's Git resource at release-creation time.Format (multi-line, mirrors the Octopus CLI
--git-resourceflag):StepName:GitReforStepName:GitResourceName:GitRef.Why
For version-controlled / Argo CD projects, the branch a step's Git resource points at is resolved at release creation, before Octopus variables are evaluated — so it could not previously be set from GitHub Actions (variables resolve too late, defaulting the release to
main). The server API, Go SDK, and CLI already support this viagitResources; only the Action lacked an input. This closes that gap.Customer request SF-2251: deploy a feature branch to Dev from GitHub Actions by pointing the Update Argo CD Application Manifests step at the pushed branch.
How it flows
git_resourcesinput →InputParameters.gitResources→CreateReleaseCommandV1.GitResources→POST /releases/create/v1. The step'sSelectedGitResourceson the created release then reflect the chosen ref.Verification
Proven end-to-end against a real Octopus instance + a version-controlled Argo project: the built
dist(run exactly as the runner invokes it) created a release whoseSelectedGitResourcestargeted the feature branch's commit, and a real GitHub-hosted-runner workflow (push + pull_request) produced the same result.Tests
Unit test asserting
git_resourcesis parsed intogitResources(single and named-resource forms).Landing (why this is a draft)
Requires
GitResourcesonCreateReleaseCommandV1from OctopusDeploy/api-client.ts#280. Once that merges and publishes:@octopusdeploy/api-clientto the published version.npm run buildto regeneratedist/index.js.🤖 Generated with Claude Code