Skip to content

feat: add git-ref parameter to support deploying from specific branches#227

Closed
maoanran wants to merge 1 commit intomainfrom
add-git-ref-support
Closed

feat: add git-ref parameter to support deploying from specific branches#227
maoanran wants to merge 1 commit intomainfrom
add-git-ref-support

Conversation

@maoanran
Copy link
Contributor

@maoanran maoanran commented Feb 6, 2026

Add git-ref input parameter to deploy workflows to enable building and deploying from specific git refs (branches, tags, or SHAs). This enables PR comment-based deployments where the PR branch needs to be checked out and built.

Changes

  • Add git-ref input to component-build.yml and update checkouts to use it
  • Add git-ref input to deploy-generic.yml, deploy-generic-v2.yml
  • Add git-ref input to deploy-kotlin.yml, deploy-python.yml
  • Update image-tag output to use actual checked-out SHA instead of github.sha

Use case

Enables workflows like:

on:
  issue_comment:
    types: [created]

jobs:
  get-pr-ref:
    # ... get PR branch ref
  deploy:
    uses: monta-app/github-workflows/.github/workflows/deploy-generic.yml@main
    with:
      git-ref: ${{ needs.get-pr-ref.outputs.ref }}
      # ... other params

Backwards compatible

The git-ref parameter is optional and defaults to the triggering ref, so existing workflows continue to work without changes.

Add git-ref input parameter to deploy workflows to enable building and deploying from specific git refs (branches, tags, or SHAs). This enables PR comment-based deployments where the PR branch needs to be checked out and built.

Changes:
- Add git-ref input to component-build.yml and update checkouts to use it
- Add git-ref input to deploy-generic.yml, deploy-generic-v2.yml
- Add git-ref input to deploy-kotlin.yml, deploy-python.yml
- Update image-tag output to use actual checked-out SHA instead of github.sha
@maoanran maoanran force-pushed the add-git-ref-support branch from a9223b7 to 535a7a9 Compare February 6, 2026 09:24
@maoanran maoanran closed this Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant