forked from validatedpatterns/common
-
Notifications
You must be signed in to change notification settings - Fork 0
118 lines (110 loc) · 3.54 KB
/
chart-branches.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
name: Create per-chart branches
# We only run this job on the charts that will be later moved to full blown charts
# We also want to run the subtree comand only for the charts that have been actually changed
# because git subtree split is a bit of an expensive operation
# github actions do not support yaml anchors so there is more duplication than usual
on:
push:
branches:
- main
paths:
- 'acm/**'
- 'golang-external-secrets/**'
- 'hashicorp-vault/**'
- 'letsencrypt/**'
- 'clustergroup/**'
jobs:
changes:
name: Figure out per-chart changes
if: github.repository == 'validatedpatterns/common'
runs-on: ubuntu-latest
permissions: read-all
outputs:
acm: ${{ steps.filter.outputs.acm }}
golang-external-secrets: ${{ steps.filter.outputs.golang-external-secrets }}
hashicorp-vault: ${{ steps.filter.outputs.hashicorp-vault }}
letsencrypt: ${{ steps.filter.outputs.letsencrypt }}
clustergroup: ${{ steps.filter.outputs.clustergroup }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
acm:
- 'acm/**'
golang-external-secrets:
- 'golang-external-secrets/**'
hashicorp-vault:
- 'hashicorp-vault/**'
letsencrypt:
- 'letsencrypt/**'
clustergroup:
- 'clustergroup/**'
acm:
needs: changes
if: |
${{ needs.changes.outputs.acm == 'true' }} &&
github.repository == 'validatedpatterns/common'
uses: validatedpatterns/common/.github/workflows/chart-split.yml@main
permissions:
actions: write
contents: write
with:
chart_name: acm
target_repository: validatedpatterns/acm-chart
secrets: inherit
golang-external-secrets:
needs: changes
if: |
${{ needs.changes.outputs.golang-external-secrets == 'true' }} &&
github.repository == 'validatedpatterns/common'
uses: validatedpatterns/common/.github/workflows/chart-split.yml@main
permissions:
actions: write
contents: write
with:
chart_name: golang-external-secrets
target_repository: validatedpatterns/golang-external-secrets-chart
secrets: inherit
hashicorp-vault:
needs: changes
if: |
${{ needs.changes.outputs.hashicorp-vault == 'true' }} &&
github.repository == 'validatedpatterns/common'
uses: validatedpatterns/common/.github/workflows/chart-split.yml@main
permissions:
actions: write
contents: write
with:
chart_name: hashicorp-vault
target_repository: validatedpatterns/hashicorp-vault-chart
secrets: inherit
letsencrypt:
needs: changes
if: |
${{ needs.changes.outputs.letsencrypt == 'true' }} &&
github.repository == 'validatedpatterns/common'
uses: validatedpatterns/common/.github/workflows/chart-split.yml@main
permissions:
actions: write
contents: write
with:
chart_name: letsencrypt
target_repository: validatedpatterns/letsencrypt-chart
secrets: inherit
clustergroup:
needs: changes
if: |
${{ needs.changes.outputs.clustergroup == 'true' }} &&
github.repository == 'validatedpatterns/common'
uses: validatedpatterns/common/.github/workflows/chart-split.yml@main
permissions:
actions: write
contents: write
with:
chart_name: clustergroup
target_repository: validatedpatterns/clustergroup-chart
secrets: inherit