From cae68fefc6b5f367a0275617c9f83181ba54714f Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Mon, 20 Jan 2025 11:54:23 +0100 Subject: [PATCH] update cr to v1.7.0 (#220) Signed-off-by: cpanato --- .github/workflows/test-action.yml | 41 +++++++++++++++---------------- README.md | 8 +++--- action.yml | 4 +-- cr.sh | 2 +- 4 files changed, 27 insertions(+), 28 deletions(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index f41c424..bfb9896 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -3,20 +3,16 @@ name: test-chart-releaser on: pull_request: +permissions: {} + jobs: + test_chart_releaser_install_action: runs-on: ubuntu-latest + permissions: - actions: none - checks: none - contents: none - deployments: none - issues: none - packages: none - pull-requests: none - repository-projects: none - security-events: none - statuses: none + contents: read + name: Install chart-releaser and test presence in path steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 @@ -27,7 +23,17 @@ jobs: env: CR_TOKEN: "FAKE_SECRETS" - name: Check install! - run: cr version + run: | + cr version + CR_VERSION_OUTPUT=$(cr version 2>&1 /dev/null) + ACTUAL_VERSION=$(echo "$CR_VERSION_OUTPUT" | grep GitVersion | rev | cut -d ' ' -f1 | rev) + if [[ $ACTUAL_VERSION != 'v1.7.0' ]]; then + echo 'should be v1.7.0' + exit 1 + else + exit 0 + fi + shell: bash - name: Check root directory run: | if ! git diff --stat --exit-code; then @@ -37,17 +43,10 @@ jobs: test_chart_releaser_action: runs-on: ubuntu-latest + permissions: - actions: none - checks: none - contents: none - deployments: none - issues: none - packages: none - pull-requests: none - repository-projects: none - security-events: none - statuses: none + contents: read + name: Install chart-releaser and run it steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 diff --git a/README.md b/README.md index b14c4f3..dae2ead 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ A GitHub action to turn a GitHub project into a self-hosted Helm chart repo, usi ### Inputs -- `version`: The chart-releaser version to use (default: v1.6.0) +- `version`: The chart-releaser version to use (default: v1.7.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 - `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. @@ -57,7 +57,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -72,7 +72,7 @@ jobs: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.6.0 + uses: helm/chart-releaser-action@v1.7.0 env: CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" ``` @@ -86,7 +86,7 @@ It does this – during every push to `main` – by checking each chart in your ```yaml - name: Run chart-releaser - uses: helm/chart-releaser-action@v1.6.0 + uses: helm/chart-releaser-action@v1.7.0 with: charts_dir: charts config: cr.yaml diff --git a/action.yml b/action.yml index b75c1dc..017e5e7 100644 --- a/action.yml +++ b/action.yml @@ -20,9 +20,9 @@ branding: icon: anchor inputs: version: - description: "The chart-releaser version to use (default: v1.6.1)" + description: "The chart-releaser version to use (default: v1.7.0)" required: false - default: v1.6.1 + default: v1.7.0 config: description: "The relative path to the chart-releaser config file" required: false diff --git a/cr.sh b/cr.sh index 4897b65..456b74a 100755 --- a/cr.sh +++ b/cr.sh @@ -18,7 +18,7 @@ set -o errexit set -o nounset set -o pipefail -DEFAULT_CHART_RELEASER_VERSION=v1.6.1 +DEFAULT_CHART_RELEASER_VERSION=v1.7.0 show_help() { cat <