diff --git a/README.md b/README.md index 8c5885e..d585fe3 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ A GitHub action to turn a GitHub project into a self-hosted Helm chart repo, usi - `version`: The chart-releaser version to use (default: v1.6.0) - `config`: Optional config file for chart-releaser. For more information on the config file, see the [documentation](https://github.com/helm/chart-releaser#config-file) - `charts_dir`: The charts directory +- `repository`: The repository to release (default: the repository the action is running from). If used - make sure to set the appropriate CR_TOKEN for the targeted repository. - `skip_packaging`: This option, when populated, will skip the packaging step. This allows you to do more advanced packaging of your charts (for example, with the `helm package` command) before this action runs. This action will only handle the indexing and publishing steps. - `skip_existing`: Skip package upload if release/tag already exists - `skip_upload`: This option, when populated, will skip the upload step. This allows you to do more advanced uploading of your charts (for exemple with OCI based repositories) which doen't require the `index.yaml`. diff --git a/action.yml b/action.yml index b75c1dc..5794e57 100644 --- a/action.yml +++ b/action.yml @@ -69,8 +69,12 @@ runs: steps: - id: release run: | - owner=$(cut -d '/' -f 1 <<< "$GITHUB_REPOSITORY") - repo=$(cut -d '/' -f 2 <<< "$GITHUB_REPOSITORY") + repo_set=${GITHUB_REPOSITORY} + if [[ -n "${{ inputs.repository }}" ]]; then + repo_set="${{ inputs.repository }}" + fi + owner=$(cut -d '/' -f 1 <<< "$repo_set") + repo=$(cut -d '/' -f 2 <<< "$repo_set") args=(--owner "$owner" --repo "$repo") args+=(--charts-dir "${{ inputs.charts_dir }}")