Added CI
This commit is contained in:
26
.github/workflows/publish-charts.yml
vendored
26
.github/workflows/publish-charts.yml
vendored
@@ -33,18 +33,30 @@ jobs:
|
||||
fi
|
||||
done
|
||||
|
||||
# Convert to JSON array
|
||||
CHARTS_JSON=$(printf '%s\n' "${CHARTS[@]}" | jq -R . | jq -s .)
|
||||
echo "charts=$CHARTS_JSON" >> $GITHUB_OUTPUT
|
||||
echo "Found charts: ${CHARTS[*]}"
|
||||
|
||||
# Convert to JSON array manually for compatibility
|
||||
if [ ${#CHARTS[@]} -eq 0 ]; then
|
||||
echo "charts=[]" >> $GITHUB_OUTPUT
|
||||
else
|
||||
CHARTS_JSON="["
|
||||
for i in "${!CHARTS[@]}"; do
|
||||
if [ $i -gt 0 ]; then
|
||||
CHARTS_JSON="${CHARTS_JSON},"
|
||||
fi
|
||||
CHARTS_JSON="${CHARTS_JSON}\"${CHARTS[$i]}\""
|
||||
done
|
||||
CHARTS_JSON="${CHARTS_JSON}]"
|
||||
echo "charts=${CHARTS_JSON}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
lint-test:
|
||||
needs: detect-charts
|
||||
runs-on: ubuntu-latest
|
||||
if: needs.detect-charts.outputs.charts != '[]'
|
||||
if: needs.detect-charts.outputs.charts != '[]' && needs.detect-charts.outputs.charts != ''
|
||||
strategy:
|
||||
matrix:
|
||||
chart: ${{ fromJson(needs.detect-charts.outputs.charts) }}
|
||||
chart: ${{ fromJSON(needs.detect-charts.outputs.charts) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -72,7 +84,7 @@ jobs:
|
||||
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
|
||||
strategy:
|
||||
matrix:
|
||||
chart: ${{ fromJson(needs.detect-charts.outputs.charts) }}
|
||||
chart: ${{ fromJSON(needs.detect-charts.outputs.charts) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -146,5 +158,5 @@ jobs:
|
||||
- name: Summary
|
||||
run: |
|
||||
echo "📦 Helm Charts Publication Summary"
|
||||
echo "Charts processed: ${{ join(fromJson(needs.detect-charts.outputs.charts), ', ') }}"
|
||||
echo "Charts processed: ${{ join(fromJSON(needs.detect-charts.outputs.charts), ', ') }}"
|
||||
echo "Registry: $GITEA_URL/packages/$GITEA_OWNER"
|
||||
Reference in New Issue
Block a user