Skip to content

ci: skip existing charts for release #285

ci: skip existing charts for release

ci: skip existing charts for release #285

name: "Charts: Release"
concurrency:
group: gh-pages
cancel-in-progress: false
on:
workflow_dispatch:
inputs:
charts:
description: >
Charts to release. Comma-separated string.
Defaults to releasing everything.
default: ""
required: false
push:
branches:
- main
paths:
- "charts/**"
- ".github/workflows/**"
env:
HELM_VERSION: 3.9.2
jobs:
prepare:
name: Prepare data required for release
runs-on: ubuntu-22.04
outputs:
libraryChartsToRelease: ${{ steps.collect-charts.outputs.libraryChartsToRelease }}
applicationChartsToRelease: ${{ steps.collect-charts.outputs.applicationChartsToRelease }}
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- name: Collect charts to release
id: collect-charts
run: |
cd charts
libraryCharts=($(find library -maxdepth 1 -mindepth 1 -type d))
applicationCharts=($(find apps -maxdepth 1 -mindepth 1 -type d))
libraryToRelease=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${libraryCharts[@]}")
appsToRelease=$(jq --compact-output --null-input '$ARGS.positional' --args -- "${applicationCharts[@]}")
echo "libraryChartsToRelease=${libraryToRelease}" >> "$GITHUB_OUTPUT"
echo "applicationChartsToRelease=${appsToRelease}" >> "$GITHUB_OUTPUT"
release-library-charts:
name: Release Library charts to GitHub pages
uses: ./.github/workflows/charts-release-ghpages.yaml
needs:
- prepare
with:
charts: "${{ needs.prepare.outputs.libraryChartsToRelease }}"
secrets: inherit
release-application-charts:
name: Release Application charts to GitHub pages
uses: ./.github/workflows/charts-release-ghpages.yaml
needs:
- prepare
- release-library-charts
with:
charts: "${{ needs.prepare.outputs.applicationChartsToRelease }}"
secrets: inherit