Skip to content

Commit

Permalink
release operator v1.0.0 chart
Browse files Browse the repository at this point in the history
Signed-off-by: Burak Sekili <[email protected]>

release operator v1.0.0 chart

Signed-off-by: Burak Sekili <[email protected]>

op

Signed-off-by: Burak Sekili <[email protected]>

release operator v1.0.0 chart

Signed-off-by: Burak Sekili <[email protected]>

op

Signed-off-by: Burak Sekili <[email protected]>

op

Signed-off-by: Burak Sekili <[email protected]>
  • Loading branch information
buraksekili committed Oct 10, 2024
1 parent d1a599f commit f43ab22
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 26 deletions.
44 changes: 19 additions & 25 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: Release Helm charts

on:
pull_request:
branches:
- main
push:
branches:
- main
paths:
- '**/Chart.yaml'

jobs:
get-list-of-charts:
get-list-of-charts:
runs-on: ubuntu-latest
name: 'Get list of charts to be released'
outputs:
Expand All @@ -19,33 +22,24 @@ jobs:
fetch-depth: 0
- id: get-charts
name: Get list of charts to be released
shell: bash
run: |
# Get list of Chart.yaml files changed in the last commit
files_changed="$(git show --pretty="" --name-only | grep Chart.yaml)"
charts=()
for file in $files_changed; do
count=$(git show "$file" | grep -c "+version" || true)
if [ $count -eq 0 ]; then
echo "No version change in $file"
continue
fi
charts+=("$(echo "$file" | xargs dirname)")
done
set -e
set -x
charts=("components/tyk-operator")
echo "Charts array: ${charts[@]}"
if [ ${#charts[@]} -eq 0 ]; then
echo "No charts to be released"
echo "charts=none" >> "$GITHUB_OUTPUT"
else
echo "charts=$(jq 'split(" ")' -Rc <(echo ${charts[@]}))" >> "$GITHUB_OUTPUT"
echo "charts=$(jq 'split(" ")' -Rc <(echo ${charts[@]}))" >> "$GITHUB_OUTPUT"
fi
release-charts:
release-charts:
runs-on: ubuntu-latest
needs: get-list-of-charts
if: needs.get-list-of-charts.outputs.charts != 'none'

strategy:
matrix:
chart: ${{ fromJson(needs.get-list-of-charts.outputs.charts) }}
Expand Down Expand Up @@ -78,9 +72,9 @@ jobs:
- name: Push Helm Chart
uses: cloudsmith-io/[email protected]
with:
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "helm"
owner: "tyk"
repo: "helm"
file: "${{ steps.file-name.outputs.fileName }}"
api-key: ${{ secrets.CLOUDSMITH_API_KEY }}
command: "push"
format: "helm"
owner: "tyk"
repo: "helm"
file: "${{ steps.file-name.outputs.fileName }}"
2 changes: 1 addition & 1 deletion components/tyk-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: tyk-operator
description: A Helm chart to install the tyk-operator
version: 1.0.0
type: application
version: 1.0.0 # version of the chart

0 comments on commit f43ab22

Please sign in to comment.