forked from wunderio/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.72 KB
/
publish-oci.yml
File metadata and controls
65 lines (55 loc) · 1.72 KB
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
---
name: Publish Helm charts to OCI registry
on:
push:
branches: [master]
paths:
- "drupal/**"
- "frontend/**"
- "simple/**"
- "elasticsearch/**"
- "silta-release/**"
workflow_dispatch:
env:
REGISTRY: registry.wdr.io
REGISTRY_PATH: registry.wdr.io/charts
jobs:
publish:
name: Package & Push — ${{ matrix.chart }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
chart: [drupal, frontend, simple]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.16.4
- name: Add dependency repos
run: |
helm repo add wunderio https://storage.googleapis.com/charts.wdr.io
helm repo add jouve https://jouve.github.io/charts/
helm repo add percona https://percona.github.io/percona-helm-charts/
helm repo update
- name: Build chart dependencies
run: helm dependency build ./${{ matrix.chart }}
- name: Lint chart
run: helm lint ./${{ matrix.chart }}
- name: Package chart
id: package
run: |
helm package ./${{ matrix.chart }} --destination /tmp/charts
PKG=$(ls /tmp/charts/${{ matrix.chart }}-*.tgz)
echo "package=${PKG}" >> "$GITHUB_OUTPUT"
- name: Log in to Harbor
run: |
helm registry login '${{ env.REGISTRY }}' \
--username '${{ secrets.REGISTRY_USERNAME }}' \
--password '${{ secrets.REGISTRY_PASSWORD }}'
- name: Push chart to Harbor
run: |
helm push "${{ steps.package.outputs.package }}" \
"oci://${{ env.REGISTRY_PATH }}"