Update helm release and add required files

Signed-off-by: Michel Hollands <michel.hollands@gmail.com>
This commit is contained in:
Michel Hollands 2024-04-22 09:53:29 +01:00
parent b1975505e5
commit 33b8e37bed
3 changed files with 30 additions and 6 deletions

3
.github/configs/cr.yaml vendored Normal file
View File

@ -0,0 +1,3 @@
owner: grafana
git-repo: helm-charts
skip-existing: true

15
.github/configs/ct.yaml vendored Normal file
View File

@ -0,0 +1,15 @@
## Reference: https://github.com/helm/chart-testing/blob/master/doc/ct_lint-and-install.md
remote: origin
target-branch: main
chart-dirs:
- charts
chart-repos:
- grafana=https://grafana.github.io/helm-charts
- minio=https://charts.min.io
validate-chart-schema: true
validate-maintainers: true
validate-yaml: true
exclude-deprecated: true
excluded-charts: []
namespace: meta-monitoring # Need to set the namespace because we create the secret there
release-label: app.kubernetes.io/instance

View File

@ -8,6 +8,9 @@ env:
CR_PACKAGE_PATH: "${{ github.workspace }}/.cr-release-packages"
CR_TOOL_PATH: "${{ github.workspace }}/.cr-tool"
CR_VERSION: "1.5.0"
permissions:
contents: read
id-token: write
jobs:
setup:
runs-on: ubuntu-latest
@ -63,6 +66,11 @@ jobs:
runs-on: ubuntu-latest
if: needs.setup.outputs.changed == 'true'
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.app-id }}
private-key: ${{ secrets.private-key }}
- name: Checkout
uses: actions/checkout@v4
with:
@ -81,7 +89,7 @@ jobs:
fetch-depth: 0
repository: grafana/helm-charts
path: helm-charts
token: "${{ secrets.GH_BOT_ACCESS_TOKEN }}"
token: "${{ steps.app-token.outputs.token }}"
- name: Configure Git for helm-charts
run: |
@ -91,8 +99,6 @@ jobs:
- name: Set up Helm
uses: azure/setup-helm@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Parse Chart.yaml
id: parse-chart
@ -131,7 +137,7 @@ jobs:
name: ${{ steps.parse-chart.outputs.tagname }}
repository: grafana/meta-monitoring-chart
tag_name: ${{ steps.parse-chart.outputs.tagname }}
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
token: ${{ steps.app-token.outputs.token }}
generate_release_notes: true
files: |
${{ env.CR_PACKAGE_PATH }}/${{ steps.parse-chart.outputs.packagename }}.tgz
@ -145,7 +151,7 @@ jobs:
name: ${{ steps.parse-chart.outputs.packagename }}
repository: grafana/helm-charts
tag_name: ${{ steps.parse-chart.outputs.packagename }}
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
token: ${{ steps.app-token.outputs.token }}
body: |
${{ steps.parse-chart.outputs.desc }}
@ -158,4 +164,4 @@ jobs:
- name: Update helm-charts index.yaml
run: |
cd helm-charts
"${CR_TOOL_PATH}/cr" index --config "${CR_CONFIGFILE}" --token "${{ secrets.GH_BOT_ACCESS_TOKEN }}" --index-path "${CR_INDEX_PATH}" --package-path "${CR_PACKAGE_PATH}" --push
"${CR_TOOL_PATH}/cr" index --config "${CR_CONFIGFILE}" --token "${{ steps.app-token.outputs.token }}" --index-path "${CR_INDEX_PATH}" --package-path "${CR_PACKAGE_PATH}" --push