-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (85 loc) · 2.93 KB
/
example.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
# name: ArtifactHub Release Charts
# on:
# push:
# branches:
# - main
# jobs:
# # Release into ArtifactHub
# stage-publisher:
# runs-on: ubuntu-latest
# permissions:
# contents: write
# continue-on-error: false
# needs: stage-lint-test
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Extract Version from Chart.yaml
# id: versioning
# run: |
# # Extract the version from Chart.yaml
# current_version=$(grep '^version:' ./charts/alucard/Chart.yaml | awk '{print $2}')
# # Set the version as an output
# echo "CURRENT_VERSION=$current_version" >> $GITHUB_ENV
# echo "::set-output name=version::$current_version"
# - name: Helm tool installer
# uses: Azure/setup-helm@v3
# - name: Check Helm version
# run: helm version
# - name: Package Helm Chart
# run: |
# cd ./stable
# helm package --version ${{ steps.versioning.outputs.version }} ../charts/alucard
# helm repo index --url https://sithanos.github.io/alucard/stable --merge index.yaml .
# git config --local user.email ${{ secrets.USER_EMAIL }}
# git config --local user.name ${{ secrets.USER_NAME }}
# git add .
# git commit -m "feat: Update chart index with version ${{ steps.versioning.outputs.version }}"
# git push https://${{ secrets.USER_NAME }}:${{ secrets.USER_TOKEN }}@github.com/sithanos/alucard.git
# # Release into ArtifactHub
# stage-publisher:
# runs-on: ubuntu-latest
# permissions:
# contents: write
# continue-on-error: false
# needs: stage-lint-test
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Publish Helm charts
# uses: stefanprodan/helm-gh-pages@master
# with:
# token: ${{ secrets.USER_TOKEN }}
# charts_dir: charts
# # charts_url: https://sithanos.github.io/alucard
# # owner: sithanos
# # repository: alucard
# branch: main
# target_dir: stable
# # Fetch from ArtifactHub
# stage-fetch:
# runs-on: ubuntu-latest
# permissions:
# contents: write
# continue-on-error: false
# needs: stage-publisher
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - name: Configure Git
# run: |
# git config user.name "$USER_NAME"
# git config user.email "$USER_EMAIL"
# - name: Install Helm
# uses: azure/setup-helm@v4
# env:
# USER_TOKEN: "${{ secrets.USER_TOKEN }}"
# - name: Run chart-releaser
# uses: helm/chart-releaser-action@v1.6.0
# with:
# charts_dir: charts/alucard
# config: charts/assets/cr.yaml
# env:
# CR_TOKEN: "${{ secrets.USER_TOKEN }}"