-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (47 loc) · 1.4 KB
/
release.yaml
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
## Reference: https://github.com/helm/chart-releaser-action
name: Publish Charts
on:
push:
branches:
- master
paths:
- "charts/**"
concurrency:
group: helm-release
env:
HELM_VERSION: 3.9.2 # Also update in lint-test.yaml
jobs:
publish:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: ${{ env.HELM_VERSION }}
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: charts
config: cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Upload charts to quay.io
run: |
set -o xtrace
helm registry login quay.io -u ${{ secrets.QUAY_USERNAME }} -p ${{ secrets.QUAY_PASSWORD }}
if [ -d .cr-release-packages ]; then
for CHART in $(find .cr-release-packages -type f -printf '%f\n'); do
CHART_NAME=$(echo $CHART | rev | cut -d '-' -f2- | rev )
helm push .cr-release-packages/$CHART oci://quay.io/codefresh/charts
done
fi