ci: Fix release pipeline #358
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
--- | |
name: "Charts: Release" | |
concurrency: helm-release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths: | |
- "charts/**" | |
jobs: | |
prepare: | |
name: Prepare data required for workflow | |
runs-on: ubuntu-22.04 | |
outputs: | |
repoConfiguration: ${{ steps.repo-config.outputs.config }} | |
libraryChartsToRelease: ${{ steps.changed-library-charts.outputs.all_changed_files }} | |
applicationChartsToRelease: ${{ steps.changed-charts.outputs.all_changed_files }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Grab repository configuration | |
id: repo-config | |
shell: bash | |
run: | | |
echo "config=$(yq '.' '.ci/repo-config.yaml' -o json -I=0)" >> "$GITHUB_OUTPUT" | |
- name: Get changed library charts | |
id: changed-library-charts | |
uses: tj-actions/changed-files@v45 | |
with: | |
matrix: true | |
path: charts | |
dir_names: true | |
dir_names_max_depth: 2 | |
files: | | |
library/** | |
- name: Get changed charts | |
id: changed-charts | |
uses: tj-actions/changed-files@v45 | |
with: | |
matrix: true | |
path: charts | |
dir_names: true | |
dir_names_max_depth: 2 | |
files_ignore: | | |
library/** | |
release-library-charts: | |
name: Release library charts | |
needs: | |
- prepare | |
if: ${{ needs.prepare.outputs.libraryChartsToRelease != '[]' }} | |
uses: ./.github/workflows/charts-release-steps.yaml | |
permissions: | |
pages: write | |
id-token: write | |
contents: write | |
packages: write | |
with: | |
charts: ${{ needs.prepare.outputs.libraryChartsToRelease }} | |
excludedChartsRelease: ${{ toJSON(fromJSON(needs.prepare.outputs.repoConfiguration).excluded-charts-release) }} | |
ghPagesBranch: gh-pages | |
publishToOciRegistry: false | |
release-other-charts: | |
name: Release other charts | |
needs: | |
- prepare | |
- release-library-charts | |
if: ${{ needs.prepare.outputs.applicationChartsToRelease != '[]' }} | |
uses: ./.github/workflows/charts-release-steps.yaml | |
permissions: | |
pages: write | |
id-token: write | |
contents: write | |
packages: write | |
with: | |
charts: ${{ needs.prepare.outputs.applicationChartsToRelease }} | |
excludedChartsRelease: ${{ toJSON(fromJSON(needs.prepare.outputs.repoConfiguration).excluded-charts-release) }} | |
ghPagesBranch: gh-pages |