-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (52 loc) · 1.75 KB
/
helm-chart-releaser.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
name: Release Charts
on:
workflow_dispatch:
push:
branches:
- main
concurrency:
group: release-helm-chart
cancel-in-progress: false
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
fetch-depth: 0
ref: main
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Extract and add dependencies
run: |
# Extract dependencies, filter for unique and starting with https
repos=$(find automation -name "Chart.yaml" -exec yq '.dependencies[].repository' {} \; | \
sort | \
uniq | \
grep '^https')
# Loop through repositories and add them
for repo in $repos; do
echo "Adding repo \"$(basename "$repo")\" with source \"$repo\""
helm repo add "$(basename "$repo")" "$repo" || echo "Failed to add \"$repo\""
done
- name: Run chart-releaser
uses: helm/chart-releaser-action@a917fd15b20e8b64b94d9158ad54cd6345335584 #v1.6.0
with:
charts_dir: automation
skip_existing: true
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- uses: RocketChat/[email protected]
if: failure()
with:
type: ${{ job.status }}
job_name: 'Helmchart Release Status: '
url: ${{ secrets.RC_WEBHOOK }}
channel: '#dbp-dev-monitoring'
username: Helmchart Failure Notificator