Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to release to a different repository #195

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
8 changes: 6 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}")
Expand Down