-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Charlie Haley <[email protected]>
- Loading branch information
1 parent
b3b2c08
commit bdc3c09
Showing
6 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
remote: origin | ||
target-branch: main | ||
debug: true | ||
check-version-increment: true | ||
upgrade: true | ||
validate-chart-schema: true | ||
validate-yaml: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
CT_ARGS="" | ||
GIT_SAFE_DIR="false" | ||
|
||
if [ "$GIT_SAFE_DIR" != "true" ]; then | ||
git config --global --add safe.directory /charts/chart | ||
fi | ||
|
||
CT_ARGS="--charts ${PWD}/charts" | ||
|
||
ct lint --config=./.github/chart-testing.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
/usr/bin/helm unittest --color ./chart/benthos-captain; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Release Chart | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name blobbot-helm | ||
git config user.email [email protected] | ||
- name: Get chart.yaml verison | ||
id: chart_version | ||
run: | | ||
echo "CHART_VERSION=$(grep -o 'version: [0-9.]*' Chart.yaml | awk '{print $2}')" >> $GITHUB_OUTPUT | ||
- name: Check if tag exists | ||
id: tag_exists | ||
run: | | ||
if ! git show-ref --verify --quiet "refs/tags/chart-${{ steps.chart_version.outputs.CHART_VERSION }}"; then | ||
TAG_EXISTS=false | ||
else | ||
TAG_EXISTS=true | ||
fi | ||
echo "TAG_EXISTS=$TAG_EXISTS" >> $GITHUB_OUTPUT | ||
- name: Tag release | ||
id: tag_version | ||
uses: mathieudutour/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
custom_tag: ${{ steps.chart_version.outputs.CHART_VERSION }} | ||
tag_prefix: "chart-" | ||
if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | ||
|
||
- name: Create release | ||
if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ steps.tag_version.outputs.new_tag }} | ||
name: ${{ steps.tag_version.outputs.new_tag }} | ||
body: ${{ steps.tag_version.outputs.changelog }} | ||
|
||
- name: Publish Helm chart | ||
if: steps.tag_exists.outputs.TAG_EXISTS == 'false' | ||
uses: stefanprodan/helm-gh-pages@89c6698c192e70ed0e495bee7d3d1ca5b477fe82 | ||
with: | ||
token: ${{ secrets.CHARTS_REPO_TOKEN }} | ||
owner: benthosdev | ||
repository: charts | ||
branch: main | ||
target_dir: benthos | ||
index_dir: . | ||
charts_dir: chart/ | ||
charts_url: https://benthosdev.github.io/charts | ||
commit_username: blobbot-helm | ||
commit_email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Test chart | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_call: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "$GITHUB_ACTOR" | ||
git config user.email "[email protected]" | ||
- name: Test | ||
run: make chart-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters