Skip to content

Commit

Permalink
Remove deprecated charts_repo_url & mark_as_latest inputs in doc & code
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Park <krapi0314@gmail.com>
  • Loading branch information
krapie committed Apr 18, 2023
1 parent db5211e commit 0d76e26
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 22 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ A GitHub action to turn a GitHub project into a self-hosted Helm chart repo, usi

1. A GitHub repo containing a directory with your Helm charts (default is a folder named `/charts`, if you want to
maintain your charts in a different directory, you must include a `charts_dir` input in the workflow).
1. A GitHub branch called `gh-pages` to store the published charts. See `charts_repo_url` for alternatives.
1. A GitHub branch called `gh-pages` to store the published charts.
1. In your repo, go to Settings/Pages. Change the `Source` `Branch` to `gh-pages`.
1. Create a workflow `.yml` file in your `.github/workflows` directory. An [example workflow](#example-workflow) is available below.
For more information, reference the GitHub Help Documentation for [Creating a workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file)
Expand All @@ -18,9 +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.4.1)
- `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
- `charts_repo_url`: The GitHub Pages URL to the charts repo (default: `https://<owner>.github.io/<project>`)
- `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.
- `mark_as_latest`: When you set this to `false`, it will mark the created GitHub release not as 'latest'.

### Environment variables

Expand Down Expand Up @@ -80,7 +78,6 @@ It does this – during every push to `main` – by checking each chart in your
with:
charts_dir: charts
config: cr.yaml
charts_repo_url: xxxxxx
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
```
Expand Down
8 changes: 0 additions & 8 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ inputs:
skip_packaging:
description: "skip the packaging option (do your custom packaging before running this action"
required: false
mark_as_latest:
description: Mark the created GitHub release as 'latest'
required: false
default: true

runs:
using: composite
Expand Down Expand Up @@ -65,9 +61,5 @@ runs:
args+=(--skip-packaging "${{ inputs.skip_packaging }}")
fi
if [[ -n "${{ inputs.mark_as_latest }}" ]]; then
args+=(--mark-as-latest "${{ inputs.mark_as_latest }}")
fi
"$GITHUB_ACTION_PATH/cr.sh" "${args[@]}"
shell: bash
10 changes: 0 additions & 10 deletions cr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ main() {
local install_dir=
local install_only=
local skip_packaging=
local mark_as_latest=true

parse_command_line "$@"

Expand Down Expand Up @@ -173,12 +172,6 @@ parse_command_line() {
shift
fi
;;
-l|--mark-as-latest)
if [[ -n "${2:-}" ]]; then
mark_as_latest="$2"
shift
fi
;;
*)
break
;;
Expand Down Expand Up @@ -280,9 +273,6 @@ release_charts() {
if [[ -n "$config" ]]; then
args+=(--config "$config")
fi
if [[ "$mark_as_latest" = false ]]; then
args+=(--make-release-latest=false)
fi

echo 'Releasing charts...'
cr upload "${args[@]}"
Expand Down

0 comments on commit 0d76e26

Please sign in to comment.