Skip to content

Merge pull request #16 from a1994sc/renovate/nats-2.x #115

Merge pull request #16 from a1994sc/renovate/nats-2.x

Merge pull request #16 from a1994sc/renovate/nats-2.x #115

Workflow file for this run

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 }}