-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.54 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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@v45
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 }}