Skip to content

feat: add configurable separator for tag components - #7

Open
Bentzeh wants to merge 1 commit into
KoalaOps:mainfrom
gankster-ggwp:feature/configurable-separator
Open

feat: add configurable separator for tag components#7
Bentzeh wants to merge 1 commit into
KoalaOps:mainfrom
gankster-ggwp:feature/configurable-separator

Conversation

@Bentzeh

@Bentzeh Bentzeh commented Jan 29, 2026

Copy link
Copy Markdown

Summary

  • Adds new separator input parameter to customize the character used between tag components (service, date, branch, counter)
  • Default remains _ for full backward compatibility
  • Users can set separator: "-" to generate semver-compatible tags

Motivation

Some deployment systems (e.g., Capgo for mobile apps) require semver-compatible tags where build metadata must use hyphens. The current hardcoded underscore separator (api_2024-01-15_main_00) produces invalid semver tags for these systems.

Usage

- uses: koalaops/determine-image-tag@v1
  with:
    service_name: api
    separator: "-"  # produces: api-2024-01-15-main-00 (semver-compatible)

Changes

  • Added separator input (default: _)
  • Updated tag generation to use the separator variable instead of hardcoded _
  • Updated counter pattern matching to use configurable separator
  • Updated README with documentation and example

Test plan

  • Test with default separator (_) produces same output as before
  • Test with - separator produces hyphen-separated tags
  • Verify counter logic works correctly with custom separator

🤖 Generated with Claude Code

Add new `separator` input parameter that allows customizing the character
used to join tag components (service, date, branch, counter).

Default remains `_` for backward compatibility. Users can set `separator: "-"`
to generate semver-compatible tags, which is required for systems like Capgo
that validate build metadata format.

Example usage:
  - uses: koalaops/determine-image-tag@v1
    with:
      service_name: api
      separator: "-"  # produces: api-2024-01-15-main-00

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

2 participants