Skip to content

Commit

Permalink
Allow configuration of chart directory when releasing (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannick-roeder authored Dec 2, 2021
1 parent 5a52bf9 commit 84516a0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 7 additions & 2 deletions helm-lint/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Lint helm chart"
description: "Lint all helm charts in this repository"
description: "Lint all helm charts in the chart directory (default: charts)"
inputs:
lintConfig:
description: "The path to the lint configuration file."
Expand All @@ -22,5 +22,10 @@ runs:
uses: helm/chart-testing-action@v2.0.1

- name: Run chart-testing (lint)
run: ct lint --config ${{ inputs.lintConfig }}
run: |
if [[ "${GITHUB_REF#refs/heads/}" == "main" || "${GITHUB_REF#refs/heads/}" == "master" ]]; then
ct lint --config ${{ inputs.lintConfig }} --since HEAD^
else
ct lint --config ${{ inputs.lintConfig }} --since HEAD
fi
shell: bash
8 changes: 7 additions & 1 deletion helm-release/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: "Release helm chart"
description: "Release all changed helm charts in this repository"
description: "Release all changed helm charts in the chart directory (default: charts)"
inputs:
githubToken:
description: "The github access token for pushing."
Expand All @@ -18,6 +18,10 @@ inputs:
description: "The path to the lint configuration file."
default: ".github/lint-config.yaml"
required: false
chartDirectory:
description: "The parent directory of all charts in this repository."
default: "charts"
required: false
runs:
using: "composite"
steps:
Expand All @@ -41,5 +45,7 @@ runs:

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.2.1
with:
charts_dir: "${{ inputs.chartDirectory}}"
env:
CR_TOKEN: "${{ inputs.githubToken }}"

0 comments on commit 84516a0

Please sign in to comment.