From 23f66a1501d8198fd399c484d060d16b007566a4 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Fri, 6 Dec 2024 10:26:14 +0000 Subject: [PATCH] chore: Update docs for only relevant chart based on branch (#501) Otherwise release PRs might have docs from the other chart https://github.com/cloudquery/helm-charts/pull/500 --- .github/workflows/auto_update_docs.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/auto_update_docs.yml b/.github/workflows/auto_update_docs.yml index a639ccb4..ea699252 100644 --- a/.github/workflows/auto_update_docs.yml +++ b/.github/workflows/auto_update_docs.yml @@ -18,6 +18,16 @@ jobs: run: | docker run --rm --volume "$(pwd):/helm-docs" -u "$(id -u)" jnorwood/helm-docs:v1.11.0 + - name: Get component from branch name + uses: actions/github-script@v7 + id: component + with: + result-encoding: string + script: | + const lastPartOfBranch = context.ref.split('-').pop(); + return lastPartOfBranch; + - uses: stefanzweifel/git-auto-commit-action@v5 with: + file_pattern: charts/${{ steps.component.outputs.result }}/README.md commit_message: "chore: Update docs"