Merge pull request #25 from a1994sc/renovate/nats-1.x #121
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 Charts | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: set-matrix | |
env: | |
CHARTS_DIR: charts | |
run: echo "matrix={\"include\":[$(ls -d ${CHARTS_DIR}/* | awk '{printf "%s{\"chart\":\"%s\"}", sep, $0; sep=","} END {print ""}')]}" >> $GITHUB_OUTPUT | |
release: | |
needs: setup | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
strategy: | |
matrix: ${{ fromJSON(needs.setup.outputs.matrix) }} | |
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 "$GITHUB_ACTOR@users.noreply.github.com" | |
- name: Install Helm | |
uses: azure/setup-helm@v4 | |
with: | |
version: v3.12.2 | |
- name: Get changed files in the docs folder | |
id: changed-files-specific | |
uses: tj-actions/changed-files@v44 | |
with: | |
files: ${{ matrix.chart }}/** | |
- name: Push Helm chart to OCI compatible registry (Github) | |
uses: bsord/helm-push@v4.2.0 | |
continue-on-error: true | |
if: steps.changed-files-specific.outputs.any_changed == 'true' | |
with: | |
useOCIRegistry: true | |
registry-url: oci://ghcr.io/a1994sc/helm | |
username: a1994sc | |
access-token: ${{secrets.GITHUB_TOKEN}} | |
chart-folder: ${{ matrix.chart }} |