feat: add source-dir and repo-url inputs for external repo support

Allow changelog generation from upstream repositories instead of only
the current working directory. Supports packaging repos that contain
only rpm spec files while the source lives in an external git repo.

- source-dir: point at an existing local checkout
- repo-url: action clones a bare copy automatically
- source-dir takes precedence if both are set

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-27 10:36:00 +03:00
parent 22e2e34724
commit 328101f247
3 changed files with 109 additions and 3 deletions

View File

@@ -44,6 +44,22 @@ inputs:
default: |
^- chore: bump version
^- Merge
source-dir:
description: >
Path to a local git checkout to collect commits from, instead
of the current working directory. Useful when your packaging
repo is separate from the upstream source repo and you have
already cloned the source elsewhere in the workflow.
required: false
default: ''
repo-url:
description: >
URL of an external git repository to collect commits from.
The action will clone (bare, tags-only) this repo into a
temporary directory and read its history. Mutually exclusive
with source-dir — if both are set, source-dir wins.
required: false
default: ''
runs:
using: composite
@@ -57,6 +73,8 @@ runs:
CHANGELOG_AUTHOR: ${{ inputs.author }}
TAG_PATTERN: ${{ inputs.tag-pattern }}
EXCLUDE_PATTERNS: ${{ inputs.exclude-patterns }}
SOURCE_DIR: ${{ inputs.source-dir }}
REPO_URL: ${{ inputs.repo-url }}
run: |
bash "${{ github.action_path }}/scripts/generate-rpm-changelog.sh" \
"$SPEC" "$VERSION"