chore(monolith): pin helm release redis v20.6.2 (#316) #179
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: Release | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/release.yaml | |
- parcellab/** | |
- "!**.md" | |
workflow_dispatch: | |
jobs: | |
matrix: | |
runs-on: ubuntu-latest | |
outputs: | |
charts: ${{ steps.generate-matrix.outputs.charts }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Load repos configuration file | |
id: generate-matrix | |
run: | | |
export CHARTS=$(ls -d parcellab/* | awk ' BEGIN { ORS = ""; print "["; } { print "\/\@"$0"\/\@"; } END { print "]"; }' | sed "s^\"^\\\\\"^g;s^\/\@\/\@^\", \"^g;s^\/\@^\"^g") | |
echo "::set-output name=charts::$CHARTS" | |
test: | |
needs: matrix | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
chart: ${{ fromJSON(needs.matrix.outputs.charts) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Update dependencies | |
run: helm dependency update ${{ matrix.chart }} | |
- name: Lint chart | |
run: helm lint ${{ matrix.chart }} | |
- name: Template chart | |
run: | | |
helm show chart ${{ matrix.chart }} | grep "type: library" || helm template ${{ matrix.chart }} > output.yaml | |
- if: matrix.chart != 'parcellab/common' | |
name: Evaluate k8s resources | |
uses: instrumenta/kubeval-action@master | |
with: | |
files: output.yaml | |
release: | |
if: github.ref == 'refs/heads/main' | |
needs: 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: Run chart-releaser library | |
uses: helm/[email protected] | |
with: | |
charts_dir: parcellab | |
charts_repo_url: https://charts.parcellab.dev | |
config: cr.yaml | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
CR_SKIP_EXISTING: true |